package format
import "github.com/Microsoft/hcsshim/pkg/cimfs/format"
format package maintains some basic structures to allows us to read header of a cim file. This is mostly required to understand the region & objectid files associated with a particular cim. Otherwise, we don't need to parse the cim format.
Index ¶
- Constants
- Variables
- type CommonHeader
- type FileType
- type FilesystemHeader
- type Magic
- type RegionOffset
- type RegionSet
- type Version
Constants ¶
const ( RegionFileName = "region" ObjectIDFileName = "objectid" )
Variables ¶
var CurrentVersion = Version{3, 0}
var MinSupportedVersion = Version{2, 0}
Types ¶
type CommonHeader ¶
type CommonHeader struct { Magic Magic HeaderLength uint32 Type FileType Reserved uint8 Reserved2 uint16 Version Version Reserved3 uint64 }
CommonHeader is the common header for all CIM-related files.
type FileType ¶
type FileType uint8
type FilesystemHeader ¶
type FilesystemHeader struct { Common CommonHeader Regions RegionSet FilesystemOffset RegionOffset Reserved uint32 Reserved1 uint16 ParentCount uint16 }
FilesystemHeader is the header for a filesystem file.
The filesystem file points to the filesystem object inside a region file and specifies regions sets.
type Magic ¶
type Magic [8]uint8
Magic specifies the magic number at the beginning of a file.
type RegionOffset ¶
type RegionOffset uint64
RegionOffset encodes an offset to objects as index of the region file containing the object and the byte offset within that file.
type RegionSet ¶
type Version ¶
type Version struct { Major, Minor uint32 }
Source Files ¶
- Version
- v0.13.0 (latest)
- Published
- Apr 21, 2025
- Platform
- windows/amd64
- Imports
- 1 packages
- Last checked
- 1 hour ago –
Tools for package owners.