(p: string, data: ArrayBuffer, cb: BFSCallback<Dropbox.File.Stat>)
| 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 |