add mkdir

This commit is contained in:
chrislu
2022-02-13 01:34:19 -08:00
parent 21046c6a28
commit e85ca10a1a
5 changed files with 95 additions and 3 deletions

View File

@@ -16,6 +16,10 @@ import (
func (wfs *WFS) Lookup(cancel <-chan struct{}, header *fuse.InHeader, name string, out *fuse.EntryOut) (code fuse.Status) {
if s := checkName(name); s != fuse.OK {
return s
}
dirPath := wfs.inodeToPath.GetPath(header.NodeId)
fullFilePath := dirPath.Child(name)
@@ -48,7 +52,7 @@ func (wfs *WFS) Lookup(cancel <-chan struct{}, header *fuse.InHeader, name strin
inode := wfs.inodeToPath.GetInode(fullFilePath)
wfs.outputEntry(out, inode, localEntry)
wfs.outputFilerEntry(out, inode, localEntry)
return fuse.OK