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

16
fsutils/funcs.go Normal file
View File

@@ -0,0 +1,16 @@
package fsutils
// 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
}