I wonder if anyone has ever done this.
First, one would create an alias to an existing file or directory. The documentation says that the system does not support this, only Finder can do it. As far as I can tell, you would use the Alias Manager to make an alias handle that you would then put into a file as a resource of type 'alis', ID 0, in the resource fork, save the file, and set its alias flag. At this point, one should have a alias file that Finder, Open/Save and most other apps will follow to its target.
But using NSFileManager, NSFileHandle or the Core Services file manager, your app has to go through extra steps to follow the alias. You could write code that stores data you want obscured into the data fork of the alias file, and only a very observant person will notice that the file is too big to be an alias.
Of course, aliases are rather old school, only work on HFS volumes, and may be EoL'd at some point down the road, so this weak misdirection concept would not be viable in the long term. But it sure would be interesting to know if anyone ever tried it.
First, one would create an alias to an existing file or directory. The documentation says that the system does not support this, only Finder can do it. As far as I can tell, you would use the Alias Manager to make an alias handle that you would then put into a file as a resource of type 'alis', ID 0, in the resource fork, save the file, and set its alias flag. At this point, one should have a alias file that Finder, Open/Save and most other apps will follow to its target.
But using NSFileManager, NSFileHandle or the Core Services file manager, your app has to go through extra steps to follow the alias. You could write code that stores data you want obscured into the data fork of the alias file, and only a very observant person will notice that the file is too big to be an alias.
Of course, aliases are rather old school, only work on HFS volumes, and may be EoL'd at some point down the road, so this weak misdirection concept would not be viable in the long term. But it sure would be interesting to know if anyone ever tried it.