lib/fuse/rfusefs-fuse.rb
def ftruncate(ctx,path,offset,ffi)

        return wrap_context(ctx,__method__,path,offset,ffi) if ctx

        fh = ffi.fh

        if fh.raw
          @root.raw_truncate(path,offset,fh.raw)
          if (offset <= 0)
            fh.contents = ""
          else
            fh.contents = fh.contents[0..offset]
          end
        end
      end
#ftruncate - eg called after opening a file for write without append
#sizes are adjusted at file close
eg called after opening a file for write without append
sizes are adjusted at file close
eg called after opening a file for write without append sizes are adjusted at file close
def ftruncate(ctx,path,offset,ffi)
        return wrap_context(ctx,__method__,path,offset,ffi) if ctx
        fh = ffi.fh
        if fh.raw
          @root.raw_truncate(path,offset,fh.raw)
          if (offset <= 0)
            fh.contents = ""
          else
            fh.contents = fh.contents[0..offset]
          end
        end
      end
def ftruncate ( ctx , path , offset , ffi ) return wrap_context ( ctx , __method__ , path , offset , ffi ) if ctx fh = ffi . fh if fh . raw @root . raw_truncate ( path , offset , fh . raw ) if ( offset <= 0 ) fh . contents = "" else fh . contents = fh . contents [ 0 .. offset ] end end end
ftruncate - eg called after opening a file for write without append
sizes are adjusted at file close
ftruncate - eg called after opening a file for write without append sizes are adjusted at file close
ctx
path
offset
ffi