Curious what creative use cases people have around this bizarre file format. The only reason myself and millions of other people have to deal with this stupid file is adding it to .gitignore as part of the ritual of spinning up a new codebase
Having .DS_Store all over the place sucks, but to be fair so does having other dot files, such as .git which is an entire subdir even. At least the convention of hiding dot files from file listings is uniformly observed.
Parsing the .DS_Store File Format (2018)
71–80 of 91 posts
Re: Parsing the .DS_Store File Format (2018)
#72Re: Parsing the .DS_Store File Format (2018)
#73>>Apple's operating system creates this file in apparently all directories to store meta information about its contents. In fact, it contains the names of all files (and also directories) in that folder. Anyone have an idea why modern versions of MacOS still uses a .DS_Store file? The OS could just as easily read and display the contents of a directory. And deleting a .DS_Store file doesn't seem to have any noticeabl…
For the exact same reason Windows has a Desktop.ini file?
They store per directory settings for the Mac Finder and Windows Explorer.
Re: Parsing the .DS_Store File Format (2018)
#74I'm on Big Sur (11.7.1) and I didn't find a way to make finder NOT create them.
It's (one of the many) irritating idiosyncrasies of this OS
Re: Parsing the .DS_Store File Format (2018)
#75Is there a reliable way to make the os NOT create these `.DS_Store` files? I really don't like them and the fact that they pollute every folder. I'm on Big Sur (11.7.1) and I didn't find a way to make finder NOT create them. It's (one of the many) irritating idiosyncrasies of this OS
Re: Parsing the .DS_Store File Format (2018)
#76Is there a reliable way to make the os NOT create these `.DS_Store` files? I really don't like them and the fact that they pollute every folder. I'm on Big Sur (11.7.1) and I didn't find a way to make finder NOT create them. It's (one of the many) irritating idiosyncrasies of this OS
Re: Parsing the .DS_Store File Format (2018)
#77Is there a reliable way to make the os NOT create these `.DS_Store` files? I really don't like them and the fact that they pollute every folder. I'm on Big Sur (11.7.1) and I didn't find a way to make finder NOT create them. It's (one of the many) irritating idiosyncrasies of this OS
You can however create a cronjob that deletes the files as often as you want, the operation takes 11 seconds on my 1TB SSD with a fairly large home folder:
fd -u --type file --fixed-strings .DS_Store $HOME -x echo rm {}
obviously, remove the echo to actually delete the filesRe: Parsing the .DS_Store File Format (2018)
#78>>Apple's operating system creates this file in apparently all directories to store meta information about its contents. In fact, it contains the names of all files (and also directories) in that folder. Anyone have an idea why modern versions of MacOS still uses a .DS_Store file? The OS could just as easily read and display the contents of a directory. And deleting a .DS_Store file doesn't seem to have any noticeabl…
Storing a local file inside the directory allows for moving that directory around while also keeping those settings.
The file is invisible for users of Finder so it is still the best solution for this task.
I have a .DS_Store line in a global .gitignore and don't notice it much but when I'm annoyed by DS_Store files in a specific directory, I usually bulk delete them using `fd`:
fd -u --type file --fixed-strings .DS_Store $HOME/Projects/some-file-server-project -x echo rm {}Re: Parsing the .DS_Store File Format (2018)
#79Earlier quoted context omitted.
I think a single line in the repo's .gitignore file hurts nobody, while adding CI checks, or catching it in a code review just wastes everyone's time. Expecting everyone to configure their repos precisely is asking too much, IMO. I've seen all kinds of filters in a .gitignore for programs I don't personally use. I don't mind it at all.
Or you could just set it once per developer in their core.excludesFile and have it apply to all repos.
I'm pretty sure I'll never create so many new projects in my entire career that those 8 seconds would add up to the amount of time required to follow your suggestion. Be a little more pragmatic, folks!
Re: Parsing the .DS_Store File Format (2018)
#80Earlier quoted context omitted.
Interesting, I guess I live in impur lands :) I understand the pollution concern… but unless that .git/info/exclude is standard in the company, what prevents a intern to not have a correct exclusion there, and happily push a .ds file ? .gitignore looks more robust to the obvious user. And it’s not like it’s a file you need to look at attentively every day. But yes, I do see that you are correct!
> what prevents a intern to not have a correct exclusion there, and happily push a .ds file ? Our CI. And code review is what prevents .DS_Store to be added to .gitignore. And, again, I'm saying this as a purist with a developer team of 99% Mac users.