Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Unlink().

  • Loading branch information...
commit f54fde6199b76b770a0c646baaead027d22bdc11 1 parent 54991f4
@hanwen authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 fs.go
View
14 fs.go
@@ -265,6 +265,20 @@ func (n *FolderNode) Mkdir(name string, mode uint32, context *fuse.Context) (*fu
return a, f, fuse.OK
}
+func (n *FolderNode) Unlink(name string, c *fuse.Context) (fuse.Status) {
+ f := n.files[name]
+ if f == nil {
+ return fuse.ENOENT
+ }
+ err := n.fs.dev.DeleteObject(f.Id())
+ if err != nil {
+ return fuse.EIO
+ }
+ n.Inode().RmChild(name)
+ delete(n.files, name)
+ return fuse.OK
+}
+
func (n *FolderNode) Rmdir(name string, c *fuse.Context) (fuse.Status) {
id := n.folders[name]
if id == 0 {
Please sign in to comment.
Something went wrong with that request. Please try again.