# README
Mount
A portable Go library for filesystem related operations such as mount, format, etc.
# Functions
BindMount behaves like Mount was called with a "bind" flag set in the options list.
DefaultEntryScanFunc returns the default entry scan function.
EvalSymlinks evaluates the provided path and updates it to remove any symlinks in its structure, replacing them with the actual path components.
FormatAndMount uses unix utils to format and mount the given disk.
GetDevMounts returns a slice of all mounts for the provided device.
GetDiskFormat uses 'lsblk' to see if the given disk is unformatted.
GetMounts returns a slice of all the mounted filesystems.
MakeMountArgs makes the arguments to the mount(8) command.
Mount mounts source to target as fstype with given options.
ReadProcMountsFrom parses the contents of a mount table file, typically
"/proc/self/mountinfo".
RemoveDuplicates removes duplicate and empty values from the provided
slice of strings and maintains the original order of the list.
RemoveDuplicatesExponentialOrdered removes duplicate and empty values from the provided slice of strings using an exponentially complex algorithm and maintains the original order of the list.
RemoveDuplicatesExponentialUnordered removes duplicate and empty values from the provided slice of strings using an exponentially complex algorithm and does not maintain the original order of the list.
RemoveDuplicatesLinearOrdered removes duplicate and empty values from the provided slice of strings using a linearly complex algorithm and maintains the original order of the list.
Unmount unmounts the target.
ValidateDevice evalutes the specified path and determines whether or not it is a valid device.
# Constants
ProcMountsFields is fields per line in procMountsPath as per https://www.kernel.org/doc/Documentation/filesystems/proc.txt.
# Variables
ErrNotImplemented is returned when a platform does not implement the contextual function.
# Structs
Entry is a superset of Info and maps to the fields of a mount table entry:
(1) mount ID: unique identifier of the mount (may be reused after umount) (2) parent ID: ID of parent (or of self for the top of the mount tree) (3) major:minor: value of st_dev for files on filesystem (4) root: root of the mount within the filesystem (5) mount point: mount point relative to the process's root (6) mount options: per mount options (7) optional fields: zero or more fields of the form "tag[:value]" (8) separator: marks the end of the optional fields (9) filesystem type: name of filesystem of the form "type[.subtype]" (10) mount source: filesystem specific information or "none" (11) super options: per super block options.
FS provides many filesystem-specific functions, such as mount, format, etc.
Info describes a mounted filesystem.
# Type aliases
EntryScanFunc defines the signature of the function that is optionally provided to the functions in this package that scan the mount table.