Does stapler use absolute path for files? #20
-
I tried this in synced folders on different computers, I found it can't open stapler file created on another computer with difference in absolute path of folders between the two computers. Could it possible use relative path to the .stapled file for documents in it? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Stapler uses security scoped bookmarks, which are provided by macOS and are the modern version of an "alias". They have many benefits over symlink or a simple plain text path, but some downsides as you have discovered. A bookmark stores the relative and absolute paths, inode numbers, volume name, and much more information. This allows the shortcut to be resolved even if the file is moved on the disk, or even to another volume on the same filesystem (you could say "computer"). I simply ask the system for a bookmark, and store it. Then I ask the system to open the file at the bookmark and it does it. It's a pretty hands-off approach. So, I think the request for bookmarks to work across computers is something only Apple can address. But, perhaps there's a way I can add an option to repoint an alias to a file if it really can't be found. I'll give it some thought. I used an app called Precize to prepare this example, more info on that and bookmarks here Example bookmark (base64 encoded)
Contained information (decoded)
|
Beta Was this translation helpful? Give feedback.
Stapler uses security scoped bookmarks, which are provided by macOS and are the modern version of an "alias". They have many benefits over symlink or a simple plain text path, but some downsides as you have discovered.
A bookmark stores the relative and absolute paths, inode numbers, volume name, and much more information. This allows the shortcut to be resolved even if the file is moved on the disk, or even to another volume on the same filesystem (you could say "computer").
I simply ask the system for a bookmark, and store it. Then I ask the system to open the file at the bookmark and it does it. It's a pretty hands-off approach.
So, I think the request for bookmarks to work across comp…