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

Method _writeFileStrict

src/backend/Dropbox.ts:532–547  ·  view source on GitHub ↗
(p: string, data: ArrayBuffer, cb: BFSCallback<Dropbox.File.Stat>)

Source from the content-addressed store, hash-verified

530 }
531
532 public _writeFileStrict(p: string, data: ArrayBuffer, cb: BFSCallback<Dropbox.File.Stat>): void {
533 const parent = path.dirname(p);
534 this.stat(parent, false, (error: ApiError, stat?: Stats): void => {
535 if (error) {
536 cb(ApiError.FileError(ErrorCode.ENOENT, parent));
537 } else {
538 this._client.writeFile(p, data, (error2, stat) => {
539 if (error2) {
540 cb(this.convert(error2, p));
541 } else {
542 cb(null, stat);
543 }
544 });
545 }
546 });
547 }
548
549 /**
550 * Private

Callers 2

openMethod · 0.95
syncMethod · 0.80

Calls 5

statMethod · 0.95
convertMethod · 0.95
cbFunction · 0.85
FileErrorMethod · 0.80
writeFileMethod · 0.65

Tested by

no test coverage detected