Fuse::FileAttr
Inherits Struct < Value < Object
A Crystal-friendly description of a file's attributes. Returned from
FileSystem#getattr; #to_c marshals it into a struct stat for libfuse.
Constants
DEFAULT_GID = LibC.getgid
DEFAULT_UID = LibC.getuid
Ownership defaults to the process that mounted the filesystem (resolved once), so files show up owned by the mounting user rather than root.
Constructors
dir(nlink = 2, mode = 493, time = Time.utc, uid = DEFAULT_UID, gid = DEFAULT_GID) : self
Convenience constructor for a directory.
file(size : Int, mode = 420, time = Time.utc, uid = DEFAULT_UID, gid = DEFAULT_GID) : self
Convenience constructor for a regular file. blocks is derived from the
size (rounded up to 512-byte units) so tools like du report sanely.
new(mode : Int32, size : Int64, nlink : Int32, atime : Time, mtime : Time, ctime : Time, uid : UInt32 = DEFAULT_UID, gid : UInt32 = DEFAULT_GID)
Sourcesymlink(size : Int, mode = 511, time = Time.utc, uid = DEFAULT_UID, gid = DEFAULT_GID) : self
Convenience constructor for a symbolic link.
Instance methods
atime
Sourceatime=(atime : Time)
Sourceblksize
Sourceblksize=(blksize : Int64)
Sourceblocks
Sourceblocks=(blocks : Int64)
Sourcectime
Sourcectime=(ctime : Time)
Sourcegid
Sourcegid=(gid : UInt32)
Sourceino
Sourceino=(ino : UInt64)
Sourcemode
Sourcemode=(mode : Int32)
Sourcemtime
Sourcemtime=(mtime : Time)
Sourcenlink
Sourcenlink=(nlink : Int32)
Sourcerdev
Sourcerdev=(rdev : UInt64)
Sourcesize
Sourcesize=(size : Int64)
Sourceto_c(stat : Pointer(LibC::Stat)) : Nil
Sourceuid
Sourceuid=(uid : UInt32)
Source