MCPcopy
hub / github.com/remotely-save/remotely-save / stat

Method stat

pro/src/fsKoofr.ts:425–445  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

423 }
424
425 async stat(key: string): Promise<Entity> {
426 await this._init();
427 const { data, error } = await this.client.GET(
428 "/api/v2.1/mounts/{mountId}/files/info",
429 {
430 params: {
431 query: { path: getKoofrPath(key, this.remoteBaseDir) },
432 path: { mountId: this.placeID },
433 },
434 }
435 );
436 if (error !== undefined) {
437 throw Error(JSON.stringify(error));
438 }
439 const entity = fromFileToEntity(
440 data,
441 getKoofrPath(getParentFolder(key), this.remoteBaseDir)
442 );
443 // console.debug(entity);
444 return entity;
445 }
446
447 async mkdir(
448 key: string,

Callers 1

mkdirMethod · 0.95

Calls 4

_initMethod · 0.95
getParentFolderFunction · 0.90
getKoofrPathFunction · 0.85
fromFileToEntityFunction · 0.85

Tested by

no test coverage detected