Commit 7e853ab4 authored by Ivan Krasin's avatar Ivan Krasin

Added S_IFREG constant for regular files

parent 4c504db8
......@@ -19,7 +19,11 @@ var (
type testFuse struct{}
func (fs *testFuse) GetAttr(path string) (out Attr, code Status) {
out.Mode = S_IFDIR + 0755
if strings.HasSuffix(path, ".txt") {
out.Mode = S_IFREG + 0644
} else {
out.Mode = S_IFDIR + 0755
}
out.Mtime = uint64(time.Seconds())
return
}
......
......@@ -71,6 +71,7 @@ const (
CUSE_INIT_INFO_MAX = 4096
S_IFDIR = syscall.S_IFDIR
S_IFREG = syscall.S_IFREG
)
type Status int32
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment