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

Method _readFileFromRoot

src/fsWebdav.ts:892–900  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

890 }
891
892 async _readFileFromRoot(key: string): Promise<ArrayBuffer> {
893 const buff = (await this.client.getFileContents(key)) as BufferLike;
894 if (buff instanceof ArrayBuffer) {
895 return buff;
896 } else if (buff instanceof Buffer) {
897 return bufferToArrayBuffer(buff);
898 }
899 throw Error(`unexpected file content result with type ${typeof buff}`);
900 }
901
902 async rename(key1: string, key2: string): Promise<void> {
903 if (key1 === "/" || key2 === "/") {

Callers 1

readFileMethod · 0.95

Calls 1

bufferToArrayBufferFunction · 0.90

Tested by

no test coverage detected