xref: /third_party/libfuse/doc/mainpage.dox (revision 6881f68f)
16881f68fSopenharmony_ci/*!
26881f68fSopenharmony_ci\mainpage libfuse API documentation
36881f68fSopenharmony_ci
46881f68fSopenharmony_ciFUSE (Filesystem in Userspace) is an interface for userspace programs
56881f68fSopenharmony_cito export a filesystem to the Linux kernel. The FUSE project consists
66881f68fSopenharmony_ciof two components: the *fuse* kernel module (maintained in the regular
76881f68fSopenharmony_cikernel repositories) and the *libfuse* userspace library. libfuse
86881f68fSopenharmony_ciprovides the reference implementation for communicating with the FUSE
96881f68fSopenharmony_cikernel module.
106881f68fSopenharmony_ci
116881f68fSopenharmony_ciA FUSE file system is typically implemented as a standalone
126881f68fSopenharmony_ciapplication that links with libfuse. libfuse provides functions to
136881f68fSopenharmony_cimount the file system, unmount it, read requests from the kernel, and
146881f68fSopenharmony_cisend responses back.
156881f68fSopenharmony_ci
166881f68fSopenharmony_ci
176881f68fSopenharmony_ci## Getting started ##
186881f68fSopenharmony_ci
196881f68fSopenharmony_cilibfuse offers two APIs: a "high-level", synchronous API, and a
206881f68fSopenharmony_ci"low-level" asynchronous API. In both cases, incoming requests from
216881f68fSopenharmony_cithe kernel are passed to the main program using callbacks. When using
226881f68fSopenharmony_cithe high-level API, the callbacks may work with file names and paths
236881f68fSopenharmony_ciinstead of inodes, and processing of a request finishes when the
246881f68fSopenharmony_cicallback function returns. When using the low-level API, the callbacks
256881f68fSopenharmony_cimust work with inodes and responses must be sent explicitly using a
266881f68fSopenharmony_ciseparate set of API functions.
276881f68fSopenharmony_ci
286881f68fSopenharmony_ciThe high-level API that is primarily specified in fuse.h. The
296881f68fSopenharmony_cilow-level API that is primarily documented in fuse_lowlevel.h.
306881f68fSopenharmony_ci
316881f68fSopenharmony_ci## Examples ##
326881f68fSopenharmony_ci
336881f68fSopenharmony_ciFUSE comes with several examples in the <a
346881f68fSopenharmony_cihref="files.html">examples</a> directory. A good starting point are
356881f68fSopenharmony_cihello.c (for the high-level API) and hello_ll.c (for the low-level
366881f68fSopenharmony_ciAPI).
376881f68fSopenharmony_ci
386881f68fSopenharmony_ci## FUSE internals ##
396881f68fSopenharmony_ci
406881f68fSopenharmony_ciThe authoritative source of information about libfuse internals
416881f68fSopenharmony_ci(including the protocol used for communication with the FUSE kernel
426881f68fSopenharmony_cimodule) is the source code.
436881f68fSopenharmony_ci
446881f68fSopenharmony_ciHowever, some people have kindly documented different aspects of FUSE
456881f68fSopenharmony_ciin a more beginner friendly way. While this information is
466881f68fSopenharmony_ciincreasingly out of date, it still provides a good overview:
476881f68fSopenharmony_ci
486881f68fSopenharmony_ci- Bharat Vangoor et al have included an overview of the FUSE internals
496881f68fSopenharmony_ci  in a <a href="fast17-vangoor.pdf">paper evaluating FUSE performance</a>.
506881f68fSopenharmony_ci
516881f68fSopenharmony_ci- Some documentation of the kernel-userspace protocol is available on
526881f68fSopenharmony_ci  the <a href="https://github.com/libfuse/libfuse/wiki/">libfuse wiki</a>.
536881f68fSopenharmony_ci
546881f68fSopenharmony_ci*/
55