Documentation ¶
Overview ¶
Package cluster is responsible for opening and using the FAT. The cluster manager is thread-safe.
Index ¶
- type Manager
- func (m *Manager) ClusterCollect(cluster uint32) ([]uint32, error)
- func (m *Manager) ClusterDelete(cluster uint32) error
- func (m *Manager) ClusterEOF() uint32
- func (m *Manager) ClusterExtend(cluster uint32) (uint32, error)
- func (m *Manager) ClusterTruncate(cluster uint32) error
- func (m *Manager) FreeCount() (int64, error)
- func (m *Manager) Unmount() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager builds on top of the FAT, and can operate it on more complex ways.
func Mount ¶
func Mount(c *thinio.Conductor, br *bootrecord.Bootrecord, readonly bool) (*Manager, error)
Mount creates a new manager, which tracks access to the FAT.
func (*Manager) ClusterCollect ¶
ClusterCollect reads all clusters starting from an initial cluster.
If the starting cluster is EOF / free, an empty slice is returned. Returns an error if the cluster chain is malformed or cannot be read.
func (*Manager) ClusterDelete ¶
ClusterDelete removes all clusters chained together after "cluster". It also frees "cluster".
It's okay to pass an EOF / Free cluster to delete. Nothing happens.
func (*Manager) ClusterEOF ¶
ClusterEOF returns the cluster that means "EOF".
func (*Manager) ClusterExtend ¶
ClusterExtend allocates a new cluster.
If cluster is not an "EOF" value (or zero), the FAT's entry for cluster is updated to point to the NEW cluster. If cluster is an "EOF" (or zero) value, then a new cluster is allocated, but no old cluster is updated.
func (*Manager) ClusterTruncate ¶
ClusterTruncate removes all clusters chained together after "cluster". It sets "cluster" to EOF.
It's okay to pass an EOF / Free cluster to truncate. Nothing happens.
Directories ¶
Path | Synopsis |
---|---|
Package fat contains the actual File Allocation Table used by the FAT filesystem.
|
Package fat contains the actual File Allocation Table used by the FAT filesystem. |
fsinfo
Package fsinfo describes the FAT32-exclusive FSInfo structure
|
Package fsinfo describes the FAT32-exclusive FSInfo structure |