MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / rename

Method rename

packages/core/file-system/index.ts:106–120  ·  view source on GitHub ↗
(newName: string)

Source from the content-addressed store, hash-verified

104 }
105
106 public rename(newName: string): Promise<any> {
107 return new Promise((resolve, reject) => {
108 let hasError = false;
109 const localError = function (error) {
110 hasError = true;
111 reject(error);
112 };
113
114 this.renameSync(newName, localError);
115
116 if (!hasError) {
117 resolve(true);
118 }
119 });
120 }
121
122 public renameSync(newName: string, onError?: (error: any) => any): void {
123 if (this._isKnown) {

Callers

nothing calls this directly

Calls 2

renameSyncMethod · 0.95
resolveFunction · 0.50

Tested by

no test coverage detected