logoalt Hacker News

comex • today at 5:52 AM • 0 replies • view on HN

Yes. Sandboxed apps do get their own home directories (~/Library/Containers/.../Data) and this home directory does contain a Documents directory, but this is just for compatibility's sake – there is no reason to actually use it for anything. Files that an app saves by itself are typically expected to be stored under Library/Application Support or Library/Caches, and this is still true even for a sandboxed home directory. Documents is reserved for files the user saves manually, but as mentioned, manually-saved files should reach the real ~/Documents.

Though, there is also a third type of Documents directory, the kind located at paths such as ~/Library/Mobile Documents/com~apple~TextEdit/Documents. This is part of iCloud Drive and is the same directory that you get in Finder by going to iCloud Drive -> TextEdit. Very confusing.