struct

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

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.

Source

Instance methods

atime
Source
atime=(atime : Time)
Source
blksize
Source
blksize=(blksize : Int64)
Source
blocks
Source
blocks=(blocks : Int64)
Source
ctime
Source
ctime=(ctime : Time)
Source
gid=(gid : UInt32)
Source
ino=(ino : UInt64)
Source
mode
Source
mode=(mode : Int32)
Source
mtime
Source
mtime=(mtime : Time)
Source
rdev
Source
rdev=(rdev : UInt64)
Source
size
Source
size=(size : Int64)
Source
to_c(stat : Pointer(LibC::Stat)) : Nil
Source
uid=(uid : UInt32)
Source