MCPcopy
hub / github.com/perkeep/perkeep / dirToBeFUSE

Function dirToBeFUSE

pkg/fs/fs_test.go:832–844  ·  view source on GitHub ↗
(dir string)

Source from the content-addressed store, hash-verified

830}
831
832func dirToBeFUSE(dir string) func() bool {
833 return func() bool {
834 //func Statfs(path string, buf *Statfs_t) (err error)
835 var st unix.Statfs_t
836 if err := unix.Statfs(dir, &st); err != nil {
837 log.Printf("Statfs: %v", err)
838 return false
839 }
840 log.Printf("Statsfs: %+v", st)
841 const FUSE_SUPER_MAGIC = 0x65735546
842 return st.Type == FUSE_SUPER_MAGIC
843 }
844}
845
846// shortenString reduces any run of 5 or more identical bytes to "x{17}".
847// "hello" => "hello"

Callers 2

pkmountTestFunction · 0.85
isMountedFunction · 0.85

Calls 2

StatfsMethod · 0.80
PrintfMethod · 0.80

Tested by

no test coverage detected