MCPcopy Create free account
hub / github.com/breck7/scroll / getFusedFilesInFolder

Method getFusedFilesInFolder

external/.scrollLibs.js:22016–22026  ·  view source on GitHub ↗
(folderPath, extension)

Source from the content-addressed store, hash-verified

22014 }
22015 // todo: this is weird. i know we evolved our way here but we should step back and clean this up.
22016 async getFusedFilesInFolder(folderPath, extension) {
22017 folderPath = Utils.ensureFolderEndsInSlash(folderPath)
22018 if (this._folderCache[folderPath]) return this._folderCache[folderPath]
22019 const allFiles = (await this.list(folderPath)).filter(file => file.endsWith(extension))
22020 const loadedFiles = []
22021 for (let filePath of allFiles) {
22022 loadedFiles.push(await this.getFusedFile(filePath))
22023 }
22024 this._folderCache[folderPath] = loadedFiles
22025 return this._folderCache[folderPath]
22026 }
22027}
22028window.ScrollFileSystem = ScrollFileSystem
22029window.ScrollFile = ScrollFile

Callers 4

_getFilesInFolderMethod · 0.80
formatCommandMethod · 0.80
buildFilesInFolderMethod · 0.80
scroll.test.jsFile · 0.80

Calls 4

listMethod · 0.95
getFusedFileMethod · 0.95
filterMethod · 0.45

Tested by

no test coverage detected