- Convert symlink: Method to toggle between absolute and relative symlinks
- Could use something like
ln -sf
to convert in-place;ln -srf
can also ensure it's a relative link
- Could use something like
- Move directory without breaking (absolute) links contained within (and "move" can also be rename)
- Find absolute symlinks pointing to files within the directory structure (and store them in an JS object, relative to the path that's being changed)
- Convert all absolute symlinks that point to files within the directory to relative (temporarily)
- Move the directory
- Restore absolute symlinks at the new location (using the object that contains relative paths to the symlinks to differentiate them from any existing relative links or any absolute links pointing to outside the directory)
- Move relative symlink (including copy/paste) elsewhere
- Convert to absolute
- Move the symlink
- Convert back to relative
- Menu item for editing symlink: opens a modal to "edit"
- Dialog for editing: Has link, original, and a toggle for absolute/relative
- Menu items for conversion: "Convert absolute symlink to relative" and "Convert relative symlink to absolute" — would only show one of these, and only for symlinks
- Menu item for creating a symlink: Could instantly create a link to the file, then select that file for inline renaming.
- We'd have to support inline renaming first for that to work.
- Inline renaming is what people expect from other file managers; on Windows and macOS.
- Alternatively or for the time being, we could either to a popover or modal, I guess.
- If we make sure a symlink can be moved around, then it doesn't matter if we get the locations right by default, and can have a default symlink.