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

Method renameSync

src/backend/Emscripten.ts:228–238  ·  view source on GitHub ↗
(oldPath: string, newPath: string)

Source from the content-addressed store, hash-verified

226 public supportsSynch(): boolean { return true; }
227
228 public renameSync(oldPath: string, newPath: string): void {
229 try {
230 this._FS.rename(oldPath, newPath);
231 } catch (e) {
232 if (e.errno === ErrorCode.ENOENT) {
233 throw convertError(e, this.existsSync(oldPath) ? newPath : oldPath);
234 } else {
235 throw convertError(e);
236 }
237 }
238 }
239
240 public statSync(p: string, isLstat: boolean): Stats {
241 try {

Callers

nothing calls this directly

Calls 3

convertErrorFunction · 0.70
renameMethod · 0.65
existsSyncMethod · 0.65

Tested by

no test coverage detected