Sys.Linux.Proc.Mounts (Hyper v0.1.0)

Copy Markdown View Source

Reads the currently-mounted filesystems from /proc/mounts.

Summary

Functions

List the currently-mounted filesystems.

Parse a /proc/mounts payload: one fstab-formatted line per mount. Lines that do not parse as fstab entries are skipped — the file is kernel-generated, so a malformed line is noise, not an error.

Functions

list()

@spec list() :: {:ok, [Sys.Linux.Fstab.Spec.t()]} | {:error, File.posix()}

List the currently-mounted filesystems.

parse(content)

@spec parse(String.t()) :: [Sys.Linux.Fstab.Spec.t()]

Parse a /proc/mounts payload: one fstab-formatted line per mount. Lines that do not parse as fstab entries are skipped — the file is kernel-generated, so a malformed line is noise, not an error.