MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / IsSystemFile

Function IsSystemFile

pkg/utils/file.go:191–204  ·  view source on GitHub ↗

IsSystemFile checks if a filename is a common system file that should be ignored Returns true for files like .DS_Store, desktop.ini, Thumbs.db, and Apple Double files (._*)

(filename string)

Source from the content-addressed store, hash-verified

189// IsSystemFile checks if a filename is a common system file that should be ignored
190// Returns true for files like .DS_Store, desktop.ini, Thumbs.db, and Apple Double files (._*)
191func IsSystemFile(filename string) bool {
192 // Common system files
193 switch filename {
194 case ".DS_Store", "desktop.ini", "Thumbs.db", "@eaDir":
195 return true
196 }
197
198 // Apple Double files (._*)
199 if strings.HasPrefix(filename, "._") {
200 return true
201 }
202
203 return false
204}

Callers 6

handlePutMethod · 0.92
PutObjectMethod · 0.92
shouldIgnoreSystemFileFunction · 0.92
OpenUploadFunction · 0.92
OpenUploadWithLengthFunction · 0.92
TestIsSystemFileFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIsSystemFileFunction · 0.68