Documentation ¶
Overview ¶
Package fat32 implements a writer for the FAT32 filesystem.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Attribute ¶
type Attribute uint8
Attribute is a bitset of flags set on an inode. See also the spec page 24
const ( // AttrReadOnly marks a file as read-only AttrReadOnly Attribute = 0x01 // AttrHidden indicates that directory listings should not show this file. AttrHidden Attribute = 0x02 // AttrSystem indicates that this is an operating system file. AttrSystem Attribute = 0x04 // AttrDirectory indicates that this is a directory and not a file. AttrDirectory Attribute = 0x10 // AttrArchive canonically indicates that a file has been created/modified // since the last backup. Its use in practice is inconsistent. AttrArchive Attribute = 0x20 )
type Inode ¶
type Inode struct { // Name of the file or directory (not including its path) Name string // Time the file or directory was last modified ModTime time.Time // Time the file or directory was created CreateTime time.Time // Attributes Attrs Attribute // Children of this directory (only valid when Attrs has AttrDirectory set) Children []*Inode // Content of this file // Only valid when Attrs doesn't have AttrDirectory set. Content SizedReader // contains filtered or unexported fields }
Inode is file or directory on the FAT32 filesystem. Note that the concept of an inode doesn't really exist on FAT32, its directories are just special files.
type Options ¶
type Options struct { // Size of a logical block on the block device. Needs to be a power of two // equal or bigger than 512. If left at zero, defaults to 512. BlockSize uint16 // Number of blocks the filesystem should span. If zero, it will be exactly // as large as it needs to be. BlockCount uint32 // Human-readable filesystem label. Maximum 10 bytes (gets cut off), should // be uppercase alphanumeric. Label string // Filesystem identifier. If unset (i.e. left at zero) a random value will // be assigned by WriteFS. ID uint32 }
type SizedReader ¶
SizedReader is an io.Reader with a known size
Click to show internal directories.
Click to hide internal directories.