ADDED:
* fsutils: better/additional fsattrs functionality
* paths: highly filterable filesystem searching
This commit is contained in:
brent saner
2024-11-16 01:28:24 -05:00
parent b82f0c02ed
commit eefe02afaf
11 changed files with 384 additions and 92 deletions

View File

@@ -73,21 +73,6 @@ func getAttrs(f *os.File) (attrVal fsAttr, err error) {
return
}
// invertMap returns some handy consts remapping for easier lookups.
func invertMap(origMap map[string]fsAttr) (newMap map[fsAttr]string) {
if origMap == nil {
return
}
newMap = make(map[fsAttr]string)
for k, v := range origMap {
newMap[v] = k
}
return
}
// setAttrs is the unexported low-level syscall to set attributes. attrs may be OR'd.
func setAttrs(f *os.File, attrs fsAttr) (err error) {