rename() should work for folders
See original GitHub issueWhen running .rename() on a folder, it is expected to rename the folder, and update all file paths in that folder.
But, actually there is no effect. 😦
const {vol} = require('memfs')
vol.mkdirSync('/a');
vol.writeFileSync('/a/a.txt', 'hello');
console.log(vol.toJSON()) // {a/a.txt: "hello"}
vol.renameSync('/a/', '/b/')
console.log(vol.toJSON()) // {/a/a.txt: "hello"}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:6 (5 by maintainers)
Top Results From Across the Web
How to Change or Rename a File, Folder, or Directory
Method four · Highlight the file or folder. · Once highlighted, wait a few seconds and click the file name again. A box...
Read more >Rename a file, folder, or link in a document library
Learn how to rename a file, folder, or link in a SharePoint document library.
Read more >Rename a file or folder
As with other file managers, you can use Files to change the name of a file or folder. To rename a file or...
Read more >Renaming files and directories with the same pattern in R
Ok, so I used basename(tbl) to access only the files as I see file.rename doesn't rename directories. So for now if we forget...
Read more >How To Rename a Directory on Linux - devconnected
To rename this directory, you would use the “mv” command and specify the two directory names. $ mv /home/user/temp /home/user/directory. Note : ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just encountered this issue with my tests. Thanks for the fix @jorenbroekema 💯.
🎉 This issue has been resolved in version 3.4.1 🎉
The release is available on:
Your semantic-release bot 📦🚀