Skip to main content

Module paths

Module paths 

Source
Expand description

Where the daemon puts its mounts, and what it calls each one.

Mounts go under one root directory, one subdirectory per device, so a file manager or a script can watch a single predictable path and see devices come and go. $XDG_RUNTIME_DIR/mtp is that root: it’s per-user, it’s a tmpfs the session owns, and the OS clears it at logout, so a daemon that dies without cleaning up can’t leave anything behind past the session.

Constants§

RUNTIME_SUBDIR
Subdirectory of $XDG_RUNTIME_DIR that holds the mounts.

Functions§

device_dir_name
The directory name a device gets under the mount root.
mount_root_from_env
Resolve the mount root from the live environment.
resolve_mount_root
Resolve the directory that holds all the mounts.