MCPcopy Index your code
hub / github.com/Sandpack/nodebox-runtime / stat

Method stat

packages/nodebox/src/modules/fs.ts:154–162  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

152 }
153
154 public async stat(path: string): Promise<IFileStats> {
155 const response = await this.channel.send('fs/stat', { path }).catch((error) => {
156 throw new Error(format('Failed to stat file at path "%s"', path), { cause: error });
157 });
158 if (!response) {
159 throw new Error('File not found');
160 }
161 return response.data;
162 }
163
164 public async rm(path: string, options?: { force?: boolean; recursive?: boolean }): Promise<void> {
165 const { force, recursive } = options || {};

Callers 1

Calls 1

sendMethod · 0.45

Tested by

no test coverage detected