Skip to content

#mv Won't Work Across Disks #1

@tbeseda

Description

@tbeseda

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!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions