Documentation ¶
Index ¶
- Constants
- func Detect(path string) (string, error)
- func FSTypeToName(fsType int32) (string, error)
- func IsMountPoint(path string) bool
- func PathNameDecode(text string) string
- func PathNameEncode(text string) string
- func ResolveMountOptions(options []string) (uintptr, string)
- func StatVFS(path string) (*unix.Statfs_t, error)
- func SyncFS(path string) error
Constants ¶
const (
FilesystemSuperMagicZfs = 0x2fc12fc1
)
Filesystem magic numbers.
Variables ¶
This section is empty.
Functions ¶
func FSTypeToName ¶
FSTypeToName returns the name of the given fs type. The fsType is from the Type field of unix.Statfs_t. We use int32 so that this function behaves the same on both 32bit and 64bit platforms by requiring any 64bit FS types to be overflowed before being passed in. They will then be compared with equally overflowed FS type constant values.
func IsMountPoint ¶
IsMountPoint returns true if path is a mount point.
func PathNameDecode ¶
PathNameDecode decodes a string containing an encoded path back to its original form. The decoding scheme converts "-" back to "/" and "--" back to "-".
func PathNameEncode ¶
PathNameEncode encodes a path string to be used as part of a file name. The encoding scheme replaces "-" with "--" and then "/" with "-".
func ResolveMountOptions ¶
ResolveMountOptions resolves the provided mount options.
Types ¶
This section is empty.