MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / stat

Method stat

packages/vscode-shim/src/api/FileSystemAPI.ts:17–35  ·  view source on GitHub ↗
(uri: Uri)

Source from the content-addressed store, hash-verified

15 */
16export class FileSystemAPI {
17 async stat(uri: Uri): Promise<FileStat> {
18 try {
19 const stats = fs.statSync(uri.fsPath)
20 return {
21 type: stats.isDirectory() ? 2 : 1, // Directory = 2, File = 1
22 ctime: stats.ctimeMs,
23 mtime: stats.mtimeMs,
24 size: stats.size,
25 }
26 } catch {
27 // If file doesn't exist, assume it's a file for CLI purposes
28 return {
29 type: 1, // File
30 ctime: Date.now(),
31 mtime: Date.now(),
32 size: 0,
33 }
34 }
35 }
36
37 async readFile(uri: Uri): Promise<Uint8Array> {
38 try {

Callers 15

getPathSizeMethod · 0.80
settings.test.tsFile · 0.80
callToolFunction · 0.80
buildDirectoryTreeFunction · 0.80
executeNewMethod · 0.80
executeLegacyMethod · 0.80
executeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected