alias fuse_fill_dir_t = int function(
    void* buf, 
    char* name, 
    stat_t* stbuf, 
    off_t offset, 
    int fill_dir
) nothrow @nogc

Function to add an entry in a readdir() operation

The offset parameter can be any non-zero value that enables the filesystem to identify the current point in the directory stream. It does not need to be the actual physical position. A value of zero is reserved to indicate that seeking in directories is not supported.

Parameters

buf

the buffer passed to the readdir() operation

name

the file name of the directory entry

stbuf

file attributes, can be null

offset

offset of the next entry or zero

fill_dir

fill flags

Returns

1 if buffer is full, zero otherwise

extern (C) fuse_context* fuse_get_context() nothrow @nogc

Get the current context

The context is only valid for the duration of a filesystem operation, and thus must not be stored and used later.

Returns

the context

extern (C) fuse_args FUSE_ARGS_INIT()(int argc, char** argv) nothrow @nogc

Initializer for 'struct fuse_args'

extern (C) int fuse_main(
    int argc, 
    char** argv, 
    fuse_operations* op, 
    void* userData
) nothrow @nogc

Main function of FUSE.

This is for the lazy. This is all that has to be called from the main() function. This function does the following:

  • parses command line options (-d -s and -h);
  • passes relevant mount options to the fuse_mount();
  • installs signal handlers for INT, HUP, TERM and PIPE;
  • registers an exit handler to unmount the filesystem on program exit;
  • creates a fuse handle;
  • registers the operations;
  • calls either the single-threaded or the multi-threaded event loop.

Parameters

argc

the argument counter passed to the main() function

argv

the argument vector passed to the main() function

op

the file system operation

userData

user data supplied in the context during the init() method

Returns

0 on success, nonzero on failure

extern (C) int fuse_notify_poll(fuse_pollhandle* ph) nothrow @nogc

This function is used to notify that some expected event has occurred. Calling this function initiates a new poll() call.

extern (C) void fuse_pollhandle_destroy(fuse_pollhandle* ph)

Destroy poll handle.

extern (C) int fuse_version()

Get the version of the library.

extern (C) const(char)* fuse_pkgversion()

Get the full package version string of the library.

Public imports

  • core.sys.posix.sys.stat
  • core.sys.posix.sys.types

The module contains basic definitions of functions and structures from libfuse.