MCPcopy Create free account
hub / github.com/microsoft/vscode-cpptools / filterToFolders

Function filterToFolders

Extension/src/Utility/Filesystem/filepath.ts:23–31  ·  view source on GitHub ↗
(paths: string[])

Source from the content-addressed store, hash-verified

21}
22
23export async function filterToFolders(paths: string[]): Promise<string[]> {
24 const set = new Set(paths);
25 for (const each of [...set.keys()]) {
26 if (!each || !await filepath.isFolder(each)) {
27 set.delete(each);
28 }
29 }
30 return [...set.keys()];
31}
32
33export interface Entry {
34 name: string;

Callers 1

program.tsFile · 0.90

Calls 3

keysMethod · 0.80
isFolderMethod · 0.80
deleteMethod · 0.80

Tested by

no test coverage detected