# File lib/fuse/rfusefs-fuse.rb, line 417 def rename(ctx,from,to) return wrap_context(ctx,__method__,from,to) if ctx if @root.rename(from,to) # nothing to do elsif @root.file?(from) && @root.can_write?(to) && @root.can_delete?(from) contents = @root.read_file(from) @root.write_to(to,contents) @root.delete(from) else raise Errno::EACCES.new("Unable to move directory #{from}") end end