MCPcopy
hub / github.com/jvilk/BrowserFS / appendFileSync

Method appendFileSync

src/core/file_system.ts:745–755  ·  view source on GitHub ↗
(fname: string, data: any, encoding: string | null, flag: FileFlag, mode: number)

Source from the content-addressed store, hash-verified

743 });
744 }
745 public appendFileSync(fname: string, data: any, encoding: string | null, flag: FileFlag, mode: number): void {
746 const fd = this.openSync(fname, flag, mode);
747 try {
748 if (typeof data === 'string') {
749 data = Buffer.from(data, encoding!);
750 }
751 fd.writeSync(data, 0, data.length, null);
752 } finally {
753 fd.closeSync();
754 }
755 }
756 public chmod(p: string, isLchmod: boolean, mode: number, cb: BFSOneArgCallback): void {
757 cb(new ApiError(ErrorCode.ENOTSUP));
758 }

Callers

nothing calls this directly

Calls 3

openSyncMethod · 0.95
writeSyncMethod · 0.65
closeSyncMethod · 0.65

Tested by

no test coverage detected