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

Method isFile

Extension/src/Utility/Filesystem/filepath.ts:111–114  ·  view source on GitHub ↗
(name: any | string | undefined | Promise<string | undefined>, baseFolder?: string)

Source from the content-addressed store, hash-verified

109 }
110
111 static async isFile(name: any | string | undefined | Promise<string | undefined>, baseFolder?: string): Promise<undefined | string> {
112 const [fullName, stats] = await filepath.stats(name, baseFolder);
113 return stats?.isFile() ? fullName : undefined;
114 }
115
116 static async isFolder(name: string | undefined | Promise<string | undefined>, baseFolder?: string): Promise<undefined | string> {
117 const [fullName, stats] = await filepath.stats(name, baseFolder);

Callers 2

infoMethod · 0.45
readDirectoryFunction · 0.45

Calls 1

statsMethod · 0.80

Tested by

no test coverage detected