mve
mve copied to clipboard
Save space by hardlinking instead of copying
It would be nice if inside of view_xxxx.mve
directory, the file original.jpg
was a hardlink of the original, instead of copy (when possible). This would save hard disk space.
That sounds like a good idea. Instead of hard links, I'd suggest soft links though. Because these work across file system boundaries. The steps to achieve this would be:
- Implement a link function in the utils library
- Add an option to makescene
--link-originals
- Add code to makescene that links instead of copying if and only if we're running on Linux
Are you interested in implementing this?
I for myself think hardlink is better because it won't be affected if the originals are deleted or moved, which works more transparently and can be the default option, benefiting most users without affecting their usage.
If hardlink can't be created, be it because the OS doesn't support or because it crosses filesystem boundaries, it fallbacks to copying.
A switch to enable softlink can be an enhancement independent of this: it works on more situations, but requires user's attention.
What do you think?
Then we should just have two options perhaps, --softlink-originals
and --hardlink-originals
, to make it very explicit what is happening. In terms of fallback, I'd rather fail then falling back, again, to make it very explicit what is happening. I'd also suggest to do the same on non-Linux systems: fail if one of the options is used.