GO - Minimal parser for .DS_Store files
Clone or download
Latest commit 89310ce Apr 10, 2016
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE.md Added README & LICENSE Apr 6, 2016
README.md Added README & LICENSE Apr 6, 2016
ds_store.go Bugfix Apr 10, 2016


Go .DS_Store parser

This is a quick and dirty Go parser for .DS_Store files. I focused on the extraction of file names and ignored other parameters.

It does not support the full set of structure formats, so it might break in some scenarios.

#Useful information: The following descriptions and sourcecodes were quite helpful:

#Example code

package main

import (

func main() {

	var fileName string

	flag.StringVar(&fileName, "i", "", "DS_Store input file")

	if fileName == "" {
		panic("FileName (-i): Must be specified")
	} else if _, err := os.Stat(fileName); os.IsNotExist(err) {
		panic("FileName (-i): File does not exist:" + fileName)

	dat, err := ioutil.ReadFile(fileName)

	if err != nil {

	a, err := ds_store.NewAllocator(dat)

	filenames, err := a.TraverseFromRootNode()
	if err != nil {

	for _,f := range filenames {
		fmt.Printf("File: %s \n", f)
./ds_storeviewer -i samples/DS_Store-2
File: joomlatools-files 
File: joomlatools-files 
File: joomlatools-files 
File: joomlatools-files 


See License.md