logoalt Hacker News

self_awarenesstoday at 7:56 AM3 repliesview on HN

But it has directories and files inside, right?

It's only the program that is used to browse is different.

It's like you don't use explorer but regedit. It's the only difference.

On macOS it's not like you can always type what's inside the plist files with a text editor, sometimes you need to use 'plutil' anyway (if a plist is binary). So to browse Application Support you still often need thirdparty software anyway.

Years ago I did a small project that mapped windows hive (registry) files as a filesystem through fuse on linux. It mapped to a filesystem concept nearly flawlessly.

edit: can't reply anymore for today ('posting too fast'), so i just reply here: What is a file if not a key/value entry in a directory? Anyway, you can put custom binary data in registry, one value type is just "binary". But you shouldn't! Just like in Application Support - you can but you shouldn't. Registry just enforces it more. Entering regedit also requires to elevate it if you want to change system settings (HKEY_LOCAL_MACHINE). Changing user settings doesn't need elevation (HKEY_CURRENT_USER).


Replies

frollogastontoday at 7:59 AM

You use regedit, and only registry keys/values are in there, not other kinds of files. And editing systemwide plists on Mac means authenticating each time you touch one unless you're using a sudo terminal or sudo Finder. It does meaningfully change the experience for whoever is digging into it.

Also, Mac plists have two formats, xml and the non-text kind. Now mentioning that, I kinda hate both formats.

show 1 reply
frollogastontoday at 8:10 AM

Sorry to hear they're throttling you... ~/Library/Preferences is the usual location for plists. Application Support usually has other stuff, but can have plists too. Plists can be anywhere I guess, but the `defaults` CLI only looks in a few places unless you specify a path manually.

inigyoutoday at 9:12 AM

Actually the registry doesn't enforce that the stored bytes match the type. If you want, you can store 800 bytes and call it a DWORD.