Documentation ¶
Overview ¶
Package that assists with mounting and unmounting cleanly.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mount ¶
type Mount struct {
// contains filtered or unexported fields
}
func NewMount ¶
func NewMount(source, target, fstype string, flags uintptr, data string, makeAndDeleteDir bool) (*Mount, error)
Creates a new system mount.
func (*Mount) CleanClose ¶
Close removes the system mount and fails if the device is still busy. CleanClose and Close are safe to call multiple times.
func (*Mount) Close ¶
func (m *Mount) Close()
Close removes the system mount. The unmount is performed asynchronously. This reduces the likelihood of the unmount failing (thus ensuring the user's system is left in a clean state). But it doesn't provide any guarantees about the validity of the written bits. CleanClose and Close are safe to call multiple times.
Click to show internal directories.
Click to hide internal directories.