MCPcopy
hub / github.com/FlowiseAI/Flowise / getFiles

Method getFiles

packages/server/src/NodesPool.ts:119–128  ·  view source on GitHub ↗

* Recursive function to get node files * @param {string} dir * @returns {string[]}

(dir: string)

Source from the content-addressed store, hash-verified

117 * @returns {string[]}
118 */
119 private async getFiles(dir: string): Promise<string[]> {
120 const dirents = await promises.readdir(dir, { withFileTypes: true })
121 const files = await Promise.all(
122 dirents.map((dirent: Dirent) => {
123 const res = path.resolve(dir, dirent.name)
124 return dirent.isDirectory() ? this.getFiles(res) : res
125 })
126 )
127 return Array.prototype.concat(...files)
128 }
129}

Callers 2

loadNodesFromDirMethod · 0.95
initializeCredentialsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected