API calls to mount, and manage filesystems.
Summary
Functions
Enumerate the mounted filesystems. Returns a list of tuples, each tuple having two elements, the first being the PID of the Elixir process managing the FS, and the second being the status of the FS reported by it. The status is a tuple with four elements, the mount point of the FS, the callback module implementing the FS, the state of the FS (specific to the implementation module) and the OS PID of the port process which links the implementation module to the kernel of the OS.
Mount a filesystem. The three parameters are the mount point, the callback module which implements the filesystem, and a term, which can be anything, and is passed to the filesystem implementation initialisation.
Unmount a filesystem.
Functions
Enumerate the mounted filesystems. Returns a list of tuples, each tuple having two elements, the first being the PID of the Elixir process managing the FS, and the second being the status of the FS reported by it. The status is a tuple with four elements, the mount point of the FS, the callback module implementing the FS, the state of the FS (specific to the implementation module) and the OS PID of the port process which links the implementation module to the kernel of the OS.
iex> Exfuse.list()
[{#PID<0.194.0>, {"/tmp/foo", Exfuse.Fs.Hello, :ready, 29177}}]
Mount a filesystem. The three parameters are the mount point, the callback module which implements the filesystem, and a term, which can be anything, and is passed to the filesystem implementation initialisation.
See Exfuse.Fs for information on how to implement a filesystem callback
module.
iex> Exfuse.mount("/tmp/my_elixir_fs", MyApp.Filesystem, my_fs_opts)
{:ok, #PID<0.194.0>}Some example filesystems are provided which you can experiment with, and also inspect for improved understanding of how a filesystem is implemented.
Unmount a filesystem.
iex> Exfuse.umount("/tmp/my_elixir_fs")
{:ok, #PID<0.194.0>}