(newName: string)
| 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) { |
nothing calls this directly
no test coverage detected