helloSystem / hello

Desktop system for creators with a focus on simplicity, elegance, and usability. Based on FreeBSD. Less, but better!
2.3k stars 57 forks source link

Implement Aliases? #89

Open probonopd opened 3 years ago

probonopd commented 3 years ago

Unlike a symlink, the original file can change and an Alias will still work.

https://eclecticlight.co/2020/05/21/bookmarks-a-type-of-alias-their-access-and-use/

grahamperrin commented 3 years ago

There's support in HFS PluskIsAlias.

To the best of my knowledge: nothing comparable in UFS or OpenZFS.

Reference

probonopd commented 3 years ago

On the Mac, one can even make an Alias on FAT32. So it is not filesystem dependent. It is just a binary file. If we find a spec for it, we might be able to implement it.

% file /media/da0s1/*lias
/media/da0s1/foo.png Alias: MacOS Alias file

This is how the file begins:

image

grahamperrin commented 3 years ago

Yeah, whilst in the kitchen the phrase AliasManager came to mind. Whether you'll find relevant source code or spec, I have no idea.

probonopd commented 3 years ago

At least conceptually it is explained here: https://en.wikipedia.org/wiki/Alias_(Mac_OS)#File_structure

grahamperrin commented 3 years ago

Also via Wikipedia: Alias Manager | Apple Developer Documentation (deprecated)

https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/AccessingFilesandDirectories/AccessingFilesandDirectories.html#//apple_ref/doc/uid/TP40010672-CH3-SW10 (archived)

Via https://github.com/nathanday/ndalias/issues/3#issuecomment-114761786: