You are viewing a single thread.
View all comments View context
20 points

I am not familiar with MacOS, but that seems like a nightmare. What is the purpose of these files?

permalink
report
parent
reply
18 points

Iirc they’re indexes for the system wide search feature, Spotlight

permalink
report
parent
reply
23 points

Is there a valid reason not to store that [[anywhere else]], ideally in Spotlight’s data?

permalink
report
parent
reply
9 points

Maybe. There are many ways to move files and directories around without using Finder, at which point all indexed data about those files and directories will be stale. Forcing something as core as mv to update Spotlight would be significantly worse, I think. By keeping the .DS_Store files co-located with the directory they index, moving a directory does not invalidate the index data (though moving a file without using Finder still does). Whether retaining indexing on directory moves is a compelling enough reason to force the files everywhere is probably dependent on whether that’s a common enough pattern among workflows of users, and whether spotlight performance would suffer drastically if it were reliant on a central store not resilient against such moves.

So, it’s probably a shaky reason at best.

permalink
report
parent
reply
2 points

In Unixy environments like Mac and Linux the application can’t always know what the mountpoint of a drive is so it’s not always obvious which root folder to put those index/config files in if it’s a portable drive or network drive. Some mountpoints are standard per each OS, but not everything sticks to the standard.

permalink
report
parent
reply
54 points

the macos file browser, Finder, lets you set a background for a folder, move file icons around to arbitrary positions, other shenanigans. in order for this to work across systems on removable storage media and network mounts, they have this.

permalink
report
parent
reply
2 points

Why not make the file when a change is made like with windows desktop.ini files?

permalink
report
parent
reply
2 points

I don’t think the code is available for people to figure out whether there’s a reason or if it’s completely arbitrary.

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 6.9K

    Monthly active users

  • 1.2K

    Posts

  • 41K

    Comments