fs#renameSync won't work across partitions or attached storage. This is by design, as rename is paired to the C version of the same method, which isn't able to cross disks either. (See this closed issue for more discussion about rename.)
A solution could be piping a readStream to a writeStream, and then cleaning up the source file.
I'd attach a fix but the trouble is that listening for the end event on the pipe and firing a callback would break the synchronous nature of shelljs.
Ideas?
Great module, by the way. Very helpful!
fs#renameSyncwon't work across partitions or attached storage. This is by design, asrenameis paired to the C version of the same method, which isn't able to cross disks either. (See this closed issue for more discussion aboutrename.)A solution could be piping a
readStreamto awriteStream, and then cleaning up the source file.I'd attach a fix but the trouble is that listening for the
endevent on the pipe and firing a callback would break the synchronous nature of shelljs.Ideas?
Great module, by the way. Very helpful!