FuseApi.Cflock
— TypeCflock <: Layout
C-structure for flock
callback. Named struct flock
in std C library.
FuseApi.Ciovec
— TypeCiovec <: Layout
C-structure for ioctl
callback. Named struct iovec
in std C library.
FuseApi.Cstat
— TypeCstat <: Layout
C-structure containing inode data. Named struct stat
in std C library.
FuseApi.Cstatvfs
— TypeCstatfs <: Layout
C-structure for statfs
callback. Named struct statfs
in std C library.
FuseApi.FuseBuf
— TypeFuseBuf <: Layout
Flexible size buffer containing a pointer to variable size data and a size.
The buffer object itself has fixed size. Used in conjunction with FuseBufvec
.
FuseApi.FuseBufvec
— TypeFuseBufvec <: Layout
Variable sized vector of buffers of type FuseBuf
.
FuseApi.FuseCmdlineArgs
— TypeFuseCmdlineArgs <: Layout
Layout template for commandline arguments as to be passed to fuseparsecmdline
The length of vector pointed to by argv
is stored in field argc
. Field allocated
must be set to 0
, if the data is Julia generated.
If generated by Julia, use CStructGuarded{FuseCmdlineArgs}
.
FuseApi.FuseConnInfo
— TypeFuseConnInfo <: Layout
FuseApi.FuseCtx
— TypeFuseCtx <: Layout
C-structure returned by fuse_req_ctx(req)
containg uid
, gid
, pid
, and umask
of the process, which is responsible for the request.
The data is only valid while the request req
is being processed within one of the callback bunctions.
FuseApi.FuseEntryParam
— TypeFuseEntryParam <: Layout
Fuse wrapper type for a struct stat
, adding some extra fields. Contains an embedded field attr::Cstat
with struct stat
data.
FuseApi.FuseFileInfo
— TypeFuseFileInfo <: Layout
Layout of C-structure used by many fuse callbacks.
The C-structure is allocated and populated by the libfuse3
C-library and passed as a pointer to the callback functions as an argument fi::Ptr{FuseFileInfo}
, which is made accessible to Julia by the CStruct(fi)
conversion.
FuseApi.FuseLoopConfig
— TypeFuseLoopConfig <: Layout
Layout template as input for fuse_session_loop_mt
.
Named struct fuse_loop_config
in libfuse3
.
FuseApi.FuseLowlevelOps
— TypeFuseLowlevelOps
This structure mainly defines the names and sequence of callback functions, which can be used by the libfuse3
lowlevel interface.
Named struct fuse_lowlevel_ops
in Fuse3
library.
FuseApi.FuseReq
— TypeFuseReq
Opaque structure to identify the request. Contains the pointer as obtained by fuselib.
All typical fuse callback functions use that as their first argument.
FuseApi.FuseSession
— TypeFuseSession <: Layout
Opaque object as returned by fuse_session_new
and used by subsequent fuse session management calls. (see main_loop
)
FuseApi.LFuseCmdlineOpts
— TypeFuseCmdlineOpts <: Layout
Layout template for output argument of fuse_parse_cmdline
.
Has to be allocated by Julia caller, by CStructGuarded{FuseCmdlineOpts}
.
Field mountpoint
has to be copied immediately ofter the call, because the *char
pointer stored in there is unsafe.
FuseApi.Timespec
— TypeTimespec <: Layout
C-structure as contained in Cstat
(struct stat
).
FuseApi.create_args
— Methodcreate_args(cmd::String, args::AbstractVector{String})
Return CStructGuarded{FuseCmdlineArgs} object to pass arguments to C.
FuseApi.docall
— Methoddocall(f, req)
Provides common frame for all req-related C-callback functions If the actual callback function throws or returns a value != 0 An error reply is returned.
FuseApi.docall
— Methoddocall(f)
Frame for init
and destroy
FuseApi.filter_ops
— Methodfilter_ops(m::Module)
Return a vector of C-callable function pointers for functions with names as defined in FuseApi.FuseLowlevelOps
.
For functions, which are not exported by module
, a null pointer is generated to indicate to fuselib3
, that this function is not supported.
FuseApi.fuse_parse_cmdline
— Methodfuse_parse_cmdline(args::CStructAccess{FuseCmdlineArgs})
Return FuseCmdlineOpts object with selected options and mountpoint from the cmdline.
FuseApi.gen_callback
— Methodgen_callback(name::Symbol, f::Function, fs::Any)
Call the function named Symbol('G', name)
(for example Gread
), which generates a C-callable closure of type CFunction
, dedicated to call back the Julia function f(fs, ...)
(for example read(fs, req, ...)
).
This closure serves as a GC-handle for the function pointer, which is actually passed as a callback to be called from a C-environment.
FuseApi.getp
— Methodgetp(m::Module, f::Symbol, default::Function)
Return the function named f
, if defined and exported in module m
, otherwise the default value.
FuseApi.main_loop
— Functionmain_loop(cmdline_args::Vector{String}, fs::Module)
Set up and start a Fuse session. Use commandline arguments cmdline_args
and the filesystem implementation defined in module fs
.
Module fs
must define and export all supported callback functions, the names of which are specified in FuseLowlevelOps
.
FuseApi.noop
— Methodnoop(args...)
Dummy function - should never by actually called. If it is called, it behaves as if the function was not supported.
FuseApi.timespec_now
— Methodtimespec_now()
Current time in Timespec
format (seconds and nanoseconds)