Search code examples
macossymlinkinodeunlink

how to change symlink target while preserving inode


Normally to change a symlink target one will first unlink the file and then re-creating the symlink with the new target path. However it will be assigned a new inode number.

Maybe there is a private Mac api with an update_target_for_symlink() function, so the inode can stay the same?

In case you wonder what I need it for.. a file manager. I doubt that this is possible at all. Anyways thats what makes it interesting.


Solution

  • It looks a lot like this isn't possible at all.