Documentation
¶
Overview ¶
Package mount provides file system utiilty functions
Index ¶
- Constants
- func InMountNamespace() bool
- func IsBtrfs(path string) bool
- func IsExt4(path string) bool
- func IsHugetlbfs(path string) bool
- func IsMemoryFs(path string) bool
- func IsTmpfs(path string) bool
- func MountExt4(device, path string, readonly, sync bool) error
- func MountHugetlbfs(path string, pagesize int, size int64) error
- func MountNamespace()
- func MountTmpfs(path string, size int64) error
- func RemountReadOnly(source, target string) error
- type Mount
Constants ¶
const ( TMPFS_MAGIC = 0x1021994 HUGETLBFS_MAGIC = 0x958458f6 BTRFS_SUPER_MAGIC = 0x9123683e EXT4_SUPER_MAGIC = 0xef53 )
Variables ¶
This section is empty.
Functions ¶
func InMountNamespace ¶
func InMountNamespace() bool
func IsHugetlbfs ¶
Returns whether the path is a hugetlbfs file system
func IsMemoryFs ¶
Returns whether the path is an in memory file system file system (either hugetlbfs or tmpfs)
func MountExt4 ¶
MountExt4 mounts the specifed ext4 volume device at the specified path The readonly flag allows the device to be mounted as read only The sync flag can be used to enforce synchronous device access
func MountHugetlbfs ¶
MountTmpfs mounts a hugelbfs file system of the specified size with a specified page size at the provided path
func MountNamespace ¶
func MountNamespace()
func MountTmpfs ¶
MountTmpfs mounts a tmpfs file system of the specified size at the provided path
func RemountReadOnly ¶
RemountReadOnly remounts the specified source device at the target path as read only
