Documentation ¶
Overview ¶
Package fs exposes access to filesystems.
Index ¶
- Constants
- func CheckPiPartitionTable(t *mbr.MBR) error
- func ExpandImage(path string, partition int) error
- type Ext4FS
- type KMount
- func (m *KMount) Cat(path string) ([]byte, error)
- func (m *KMount) Chmod(path string, mode os.FileMode) error
- func (m *KMount) Chown(path string, uid, gid int) error
- func (m *KMount) Close() error
- func (m *KMount) CopyInto(sysPath, path string) error
- func (m *KMount) LStat(path string) (os.FileInfo, error)
- func (m *KMount) Mkdir(at string) error
- func (m *KMount) Mountpoint() string
- func (m *KMount) Remove(path string) error
- func (m *KMount) RemoveAll(path string) error
- func (m *KMount) Stat(path string) (os.FileInfo, error)
- func (m *KMount) Symlink(at, to string) error
- func (m *KMount) Write(path string, data []byte, perms os.FileMode) error
Constants ¶
View Source
const ( PartitionTypeFAT32LBA = 0xc PartitionTypeLinuxNativePartition = 0x83 )
Partition types
Variables ¶
This section is empty.
Functions ¶
func CheckPiPartitionTable ¶
CheckPiPartitionTable returns an error if the pi image has a bad partition table.
func ExpandImage ¶ added in v0.1.4
Types ¶
type Ext4FS ¶
type Ext4FS struct {
// contains filtered or unexported fields
}
Ext4FS represents access to an ext4 fileystem.
type KMount ¶
type KMount struct {
// contains filtered or unexported fields
}
KMount represents access to a filesystem contained within a image file, mediated by the kernel.
func KMountExt4 ¶
KMountExt4 invokes mount() to mount the ext4 filesystem in the given image, at the provided mount point.
func KMountVFat ¶
KMountVFat invokes mount() to mount the vfat filesystem in the given image, at the provided mount point.
func (*KMount) Close ¶
Close gracefully shuts down the mount, removing any loopbacks or mount points created in the process of mounting.
func (*KMount) Mountpoint ¶ added in v0.1.4
Mountpoint returns the path to the root of the mountpoint.
Click to show internal directories.
Click to hide internal directories.