Commit 0e4f426 1 parent 95f6467 commit 0e4f426 Copy full SHA for 0e4f426
File tree 1 file changed +13
-2
lines changed
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -2529,8 +2529,19 @@ changes:
2529
2529
* ` callback ` {Function}
2530
2530
* ` err ` {Error}
2531
2531
2532
- Asynchronous rename(2). No arguments other than a possible exception are given
2533
- to the completion callback.
2532
+ Asynchronously rename file at ` oldPath ` to the pathname provided
2533
+ as ` newPath ` . In the case that ` newPath ` already exists, it will
2534
+ be overwritten. No arguments other than a possible exception are
2535
+ given to the completion callback.
2536
+
2537
+ See also: rename(2).
2538
+
2539
+ ``` js
2540
+ fs .rename (' oldFile.txt' , ' newFile.txt' , (err ) => {
2541
+ if (err) throw err;
2542
+ console .log (' Rename complete!' );
2543
+ });
2544
+ ```
2534
2545
2535
2546
## fs.renameSync(oldPath, newPath)
2536
2547
<!-- YAML
You can’t perform that action at this time.
0 commit comments