file_system_utils v0.1.0 FileSystemUtils.MountFS View Source

Provides functions to mount and unmount filesystems.

Requires root user permission to run mount/umount.

Declaimer

Use at own risk. Make sure you know what you are doing.

Link to this section Summary

Functions

umount - unmount file systems

Link to this section Functions

Link to this function mount(device_path, mount_point_path, fs_type \\ "ext4") View Source
mount(String.t(), String.t(), String.t()) :: :ok | {:error, String.t()}

mount - mount a filesystem

Requires root permission

Arguments

  • device_path: Path to the device.

  • mount_point_path: Path to the mount point.

  • fs_types:

    • ext2
    • ext3
    • ext4
    • btrfs
    • xfs
    • exfat
    • etc
Link to this function umount(device_path) View Source
umount(String.t()) :: :ok | {:error, String.t()}

umount - unmount file systems

Requires root permission

Arguments

  • device_path: Path to the device