this post was submitted on 22 Jul 2023
69 points (89.7% liked)
Apple
17547 readers
331 users here now
Welcome
to the largest Apple community on Lemmy. This is the place where we talk about everything Apple, from iOS to the exciting upcoming Apple Vision Pro. Feel free to join the discussion!
Rules:
- No NSFW Content
- No Hate Speech or Personal Attacks
- No Ads / Spamming
Self promotion is only allowed in the pinned monthly thread
Communities of Interest:
Apple Hardware
Apple TV
Apple Watch
iPad
iPhone
Mac
Vintage Apple
Apple Software
iOS
iPadOS
macOS
tvOS
watchOS
Shortcuts
Xcode
Community banner courtesy of u/Antsomnia.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
When an application wants to create a file, who does it ask for permission? Who facilitates finding a spot on the disk for the new files to go?
Frankly I can't speak to the overhead for managing it but the OS is aware and could very much keep track of which applications own what. As for shared directories if they know the specific app owner obviously just remove files from app A but keep the directory if app B also uses it.
As for configuration files and save data, these are generally located in consistent places but ultimately that's going to be a responsibility of the app developer to keep with standards for where those config files go so they can persist through reinstalls.
'Do you want to delete this application completely, or would you like to keep configuration files and save data?'
But Apple doesn't really care, they want everything to feel seamless and look pretty. Actual functionality is a second thought.
It has permission via certificates and writes/copies either via bin commands (cp) or the user does it (drag app to applications). Applications don't own files within macOS. It's UNIX methodology where it's a user/group/everyone situation. Often files will be owned by "system" or the logged in user that installs them. The OS would need to snapshot what is done during installation (which is actually done by packaging utilities like composer) but this is also prone to error because it tracks all changes during installation, so if you're modifying files with other apps while the current installer is running in the background it will capture that. And I think you'd be surprised how many apps keep files in non-traditional places.
It's just not as straight-forward as you think it is and no OS really does this will. Windows uninstaller often misses a lot of registry keys and programdata/appdata files. Linux will only uninstall what it install during the apt/dnf/whatever process. Even iOS leaves things behind like folders in Files.