|
|
@ -27,6 +27,7 @@ type Dir struct { |
|
|
|
|
|
|
|
var _ = fs.Node(&Dir{}) |
|
|
|
var _ = fs.NodeCreater(&Dir{}) |
|
|
|
var _ = fs.NodeMknoder(&Dir{}) |
|
|
|
var _ = fs.NodeMkdirer(&Dir{}) |
|
|
|
var _ = fs.NodeFsyncer(&Dir{}) |
|
|
|
var _ = fs.NodeRequestLookuper(&Dir{}) |
|
|
@ -179,6 +180,20 @@ func (dir *Dir) Create(ctx context.Context, req *fuse.CreateRequest, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
func (dir *Dir) Mknod(ctx context.Context, req *fuse.MknodRequest) (fs.Node, error) { |
|
|
|
if req.Mode&os.ModeNamedPipe != 0 { |
|
|
|
glog.V(1).Infof("mknod named pipe %s", req.String()) |
|
|
|
return nil, fuse.ENOSYS |
|
|
|
} |
|
|
|
if req.Mode&req.Mode&os.ModeSocket != 0 { |
|
|
|
glog.V(1).Infof("mknod socket %s", req.String()) |
|
|
|
return nil, fuse.ENOSYS |
|
|
|
} |
|
|
|
// not going to support mknod for normal files either
|
|
|
|
glog.V(1).Infof("mknod %s", req.String()) |
|
|
|
return nil, fuse.ENOSYS |
|
|
|
} |
|
|
|
|
|
|
|
func (dir *Dir) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (fs.Node, error) { |
|
|
|
|
|
|
|
glog.V(4).Infof("mkdir %s: %s", dir.FullPath(), req.Name) |
|
|
|