* Makes `linkFilename` point to `targetFilename`. * * Performs an atomic update to the symlink: * https://blog.moertel.com/posts/2005-08-22-how-to-change-symlinks-atomically.html
(targetFilename: string, linkFilename: string)
| 791 | * https://blog.moertel.com/posts/2005-08-22-how-to-change-symlinks-atomically.html |
| 792 | */ |
| 793 | public async symlink(targetFilename: string, linkFilename: string) { |
| 794 | const tmpLinkPath = path.join(this.testDir, linkFilename + '.tmp') |
| 795 | try { |
| 796 | await fs.symlink(path.join(this.testDir, targetFilename), tmpLinkPath) |
| 797 | await fs.rename(tmpLinkPath, path.join(this.testDir, linkFilename)) |
| 798 | } catch (e) { |
| 799 | await fs.unlink(tmpLinkPath) |
| 800 | throw e |
| 801 | } |
| 802 | } |
| 803 | |
| 804 | public async renameFolder(foldername: string, newFoldername: string) { |
| 805 | await fs.rename( |
no test coverage detected