Open zetok opened 7 years ago
I will leave this open as a request, as I don't know much about it. Perhaps @OmegaPhil has input.
Also know that custom commands can be added to SpaceFM's menus for additional functionality like this. If the copy method produces a progress output, this can be integrated into the task manager percentage complete, etc. Iow this may be implemented as a (bash) SpaceFM plugin.
For filesystems that support cow, this is definitely a good idea, not sure if SpaceFM would want to get specific about the precise filesystem involved though?
SpaceFM already detects btrfs for other reasons, so implementing this might not be so difficult.
Main thing I'd like to hear input on (as not a btrfs user) is should this be default behavior and should it be optional? Would power users (eg many SpaceFM users) expect/want this?
What is the norm on other file managers, just for the record, and why?
SpaceFM generally mimics CLI tools, and cp doesn't use this feature to copy by default, it requires the --reflink option, so why should SpaceFM make it default? eg What if the user is expecting duplicate data on disk, eg for backup?
Should this feature be transparent, default, optional, or plugin?
Overall, how should this be integrated into the UI?
Looks like this is already implemented in pull request #640.
When copying large amount of data on the same fs, data gets unnecessarily duplicated, and copying takes a lot of time. With support for CoW, copy can be made almost instantaneously without data being unnecessarily duplicated.
Use case: working on some large set of data that could get irreversibly damaged if something goes wrong (PEBKAC). In order to prevent destroying original data, one would work on the copy. Copying the data with spacefm takes a lot of time and disk space. With support for CoW amount of time and used disk space could be significantly reduced.
As a workaround I spawn terminal and do
cp --reflink
manually.cp(1):
spacefm: