struct

Fuse::FileInfo

Inherits Struct < Value < Object

Wraps libfuse's fuse_file_info, handed to the open-file lifecycle operations (open, create, read, write, flush, release).

A filesystem can read the open flags and get/set the file handle fh — an arbitrary UInt64 it owns (e.g. an index into its own open-file table). Set fh in open/create; the kernel hands the same value back on every subsequent operation for that open file. See the optional Fuse::HandleTable (require "crystalfuse/handle_table") for a ready-made registry.

Constants

O_ACCMODE = 3

libc's O_ACCMODE isn't exposed by Crystal's stdlib; it's the low 2 bits.

Constructors

new(ptr : Pointer(Wrap::FileInfo))
Source

Instance methods

append?
Source
fh

The file handle. Set it in open/create; read it back in read/write/flush/release.

Source
fh=(value : UInt64) : UInt64
Source
flags

Raw open(2) flags (O_RDONLY, O_WRONLY, O_RDWR, O_APPEND, …).

Source
read_only?
Source
read_write?
Source
truncate?
Source
writable?

Opened for writing (either write-only or read-write).

Source
write_only?
Source