Documentation
¶
Index ¶
- Constants
- func FromFileMode(mode FileMode) fs.FileMode
- type AnchorVolumeDescriptorPointer
- type CdromBootVolumeDescriptor
- type CdromCdwVolumeDescriptor
- type CdromDescriptor
- type CdromDescriptorList
- type CdromExtendedAreaVolumeDescriptor
- type CdromNsrVolumeDescriptor
- type CdromTerminalVolumeDescriptor
- type CdromVolumeDescriptorHeader
- type Charspec
- type Descriptor
- type DescriptorList
- type DescriptorTag
- type EntityID
- type ExtendedAttributeHeaderDescriptor
- type Extent
- type ExtentLong
- type FileCharacteristics
- type FileEntryDescriptor
- type FileIdentifierDescriptor
- type FileInfo
- func (f *FileInfo) FileMode() fs.FileMode
- func (f *FileInfo) Gid() uint32
- func (f *FileInfo) IsDir() bool
- func (f *FileInfo) IsRoot() bool
- func (f *FileInfo) ModTime() time.Time
- func (f *FileInfo) Mode() FileMode
- func (f *FileInfo) Name() string
- func (f *FileInfo) Path() string
- func (f *FileInfo) Size() int64
- func (f *FileInfo) Sys() any
- func (f *FileInfo) Uid() uint32
- type FileMode
- func (m FileMode) Group() FileMode
- func (m FileMode) HasGroup(perms FilePerm) bool
- func (m FileMode) HasOther(perms FilePerm) bool
- func (m FileMode) HasOwner(perms FilePerm) bool
- func (m FileMode) Other() FileMode
- func (m FileMode) Owner() FileMode
- func (m FileMode) SetGroup(perms FilePerm) FileMode
- func (m FileMode) SetOther(perms FilePerm) FileMode
- func (m FileMode) SetOwner(perms FilePerm) FileMode
- func (m FileMode) UnsetGroup(perms FilePerm) FileMode
- func (m FileMode) UnsetOther(perms FilePerm) FileMode
- func (m FileMode) UnsetOwner(perms FilePerm) FileMode
- type FilePerm
- type FileSetDescriptor
- type ICBTag
- type ImageReader
- type ImplementationUse
- type ImplementationUseExtendedAttribute
- type ImplementationUseVolumeDescriptor
- type LVInformation
- type LogicalBlockAddress
- type LogicalVolumeDescriptor
- type LogicalVolumeHeaderDescriptor
- type LogicalVolumeIntegrityDescriptor
- type PartitionDescriptor
- type PartitionMap
- type PrimaryVolumeDescriptor
- type TerminatingDescriptor
- type UnallocatedSpaceDescriptor
- type VolumeDescriptorPointer
Constants ¶
const ( FileModeOtherOffset = 5 * iota FileModeGroupOffset FileModeOwnerOffset )
const ( FileModeOtherMask = ((1 << 5) - 1) << (5 * iota) FileModeGroupMask FileModeOwnerMask )
Variables ¶
This section is empty.
Functions ¶
func FromFileMode ¶
Types ¶
type AnchorVolumeDescriptorPointer ¶
type AnchorVolumeDescriptorPointer struct { Tag DescriptorTag MainVolumeDescriptorSequence Extent ReserveVolumeDescriptorSequence Extent }
AnchorVolumeDescriptorPointer structure shall only be recorded at 2 of the following 3 locations on the media: * Logical Sector 256. * Logical Sector (N - 256). * N
func (*AnchorVolumeDescriptorPointer) GetIdentifier ¶
func (d *AnchorVolumeDescriptorPointer) GetIdentifier() int
func (*AnchorVolumeDescriptorPointer) GetTag ¶
func (d *AnchorVolumeDescriptorPointer) GetTag() *DescriptorTag
type CdromBootVolumeDescriptor ¶
type CdromBootVolumeDescriptor struct {
Header CdromVolumeDescriptorHeader
}
func (*CdromBootVolumeDescriptor) GetHeader ¶
func (d *CdromBootVolumeDescriptor) GetHeader() *CdromVolumeDescriptorHeader
type CdromCdwVolumeDescriptor ¶
type CdromCdwVolumeDescriptor struct {
Header CdromVolumeDescriptorHeader
}
func (*CdromCdwVolumeDescriptor) GetHeader ¶
func (d *CdromCdwVolumeDescriptor) GetHeader() *CdromVolumeDescriptorHeader
type CdromDescriptor ¶
type CdromDescriptor interface {
GetHeader() *CdromVolumeDescriptorHeader
}
type CdromDescriptorList ¶
type CdromDescriptorList []CdromDescriptor
type CdromExtendedAreaVolumeDescriptor ¶
type CdromExtendedAreaVolumeDescriptor struct {
Header CdromVolumeDescriptorHeader
}
func (*CdromExtendedAreaVolumeDescriptor) GetHeader ¶
func (d *CdromExtendedAreaVolumeDescriptor) GetHeader() *CdromVolumeDescriptorHeader
type CdromNsrVolumeDescriptor ¶
type CdromNsrVolumeDescriptor struct {
Header CdromVolumeDescriptorHeader
}
func (*CdromNsrVolumeDescriptor) GetHeader ¶
func (d *CdromNsrVolumeDescriptor) GetHeader() *CdromVolumeDescriptorHeader
type CdromTerminalVolumeDescriptor ¶
type CdromTerminalVolumeDescriptor struct {
Header CdromVolumeDescriptorHeader
}
func (*CdromTerminalVolumeDescriptor) GetHeader ¶
func (d *CdromTerminalVolumeDescriptor) GetHeader() *CdromVolumeDescriptorHeader
type Charspec ¶
type Charspec struct { // CharacterSetType field shall have the value of 0 to indicate the CS0 coded character set. CharacterSetType uint8 // CharacterSetInfo field shall contain the following byte values with the remainder of the field set to a value of 0: // #4F, #53, #54, #41, #20, #43, #6F, #6D, #70, #72, #65, #73, #73, // #65, #64, #20, #55, #6E, #69, #63, #6F, #64, #65 CharacterSetInfo []byte }
type Descriptor ¶
type Descriptor interface { GetIdentifier() int GetTag() *DescriptorTag }
func NewDescriptor ¶
func NewDescriptor(tagId uint16) Descriptor
type DescriptorList ¶
type DescriptorList []Descriptor
type DescriptorTag ¶
type DescriptorTag struct { TagIdentifier uint16 DescriptorVersion uint16 // This field shall specify the sum modulo 256 of bytes 0-3 and 5-15 of the tag. TagChecksum uint8 TagSerialNumber uint16 // This field shall specify the CRC of the bytes of the descriptor starting at the first byte after the descriptor tag. // The CRC shall be 16 bits long and be generated by the CRC-ITU-T polynomial DescriptorCRC uint16 // The number of bytes shall be specified by the Descriptor CRC Length field. DescriptorCRCLength uint16 TagLocation uint32 }
DescriptorTag Certain descriptors specified in Part 3 have a 16 byte structure, or tag, recorded at the start of the descriptor.
type ExtendedAttributeHeaderDescriptor ¶
type ExtendedAttributeHeaderDescriptor struct { Tag DescriptorTag ImplementationAttributesLocation uint32 ApplicationAttributesLocation uint32 }
func (*ExtendedAttributeHeaderDescriptor) GetIdentifier ¶
func (d *ExtendedAttributeHeaderDescriptor) GetIdentifier() int
func (*ExtendedAttributeHeaderDescriptor) GetTag ¶
func (d *ExtendedAttributeHeaderDescriptor) GetTag() *DescriptorTag
type ExtentLong ¶
type FileCharacteristics ¶
type FileCharacteristics uint8
const ( // FileCharacteristicHidden If set to ZERO, shall mean that the existence of the file shall be made known // to the user; If set to ONE, shall mean that the existence of the file need not be made known to the user. FileCharacteristicHidden FileCharacteristics = 1 << (0 + iota) // FileCharacteristicDirectory If set to ZERO, shall mean that the file is not a directory (see 4/14.6.6); // If set to ONE, shall mean that the file is a directory. FileCharacteristicDirectory // FileCharacteristicDeleted If set to ONE, shall mean this File Identifier Descriptor identifies a file that // has been deleted; If set to ZERO, shall mean that this File Identifier Descriptor identifies a file that // has not been deleted. FileCharacteristicDeleted // FileCharacteristicParent If set to ONE, shall mean that the ICB field of this descriptor identifies the // ICB associated with the file in which is recorded the parent directory of the directory that this // descriptor is recorded in; // If set to ZERO, shall mean that the ICB field identifies the ICB associated with the file specified // by this descriptor FileCharacteristicParent // FileCharacteristicMetadata If this File Identifier Descriptor is not in a stream directory, // this bit shall be set to ZERO. If this File Identifier Descriptor is in a stream directory, // a value of ZERO shall indicate that this stream contains user data. A value of ONE shall indicate that the // stream contains implementation use data. FileCharacteristicMetadata )
func (FileCharacteristics) HasFlags ¶
func (c FileCharacteristics) HasFlags(mask FileCharacteristics) bool
type FileEntryDescriptor ¶
type FileEntryDescriptor struct { Tag DescriptorTag ICBTag ICBTag Uid uint32 Gid uint32 Permissions FileMode FileLinkCount uint16 RecordFormat uint8 RecordDisplayAttributes uint8 RecordLength uint32 InformationLength uint64 LogicalBlocksRecorded uint64 AccessTime time.Time ModificationTime time.Time AttributeTime time.Time Checkpoint uint32 ExtendedAttributeICB ExtentLong ImplementationIdentifier EntityID UniqueID uint64 LengthOfExtendedAttributes uint32 LengthOfAllocationDescriptors uint32 ExtendedAttributes []byte AllocationDescriptors []Extent }
func (*FileEntryDescriptor) GetIdentifier ¶
func (d *FileEntryDescriptor) GetIdentifier() int
func (*FileEntryDescriptor) GetTag ¶
func (d *FileEntryDescriptor) GetTag() *DescriptorTag
type FileIdentifierDescriptor ¶
type FileIdentifierDescriptor struct { Tag DescriptorTag FileVersionNumber uint16 FileCharacteristics FileCharacteristics LengthOfFileIdentifier uint8 ICB ExtentLong LengthOfImplementationUse uint16 ImplementationUse []byte FileIdentifier string }
FileIdentifierDescriptor ECMA 167 4/14.4
func (*FileIdentifierDescriptor) GetIdentifier ¶
func (d *FileIdentifierDescriptor) GetIdentifier() int
func (*FileIdentifierDescriptor) GetTag ¶
func (d *FileIdentifierDescriptor) GetTag() *DescriptorTag
type FileMode ¶
type FileMode uint32
func ToFileMode ¶
func (FileMode) UnsetGroup ¶
func (FileMode) UnsetOther ¶
func (FileMode) UnsetOwner ¶
type FileSetDescriptor ¶
type FileSetDescriptor struct { Tag DescriptorTag RecordingDateTime time.Time InterchangeLevel uint16 MaximumInterchangeLevel uint16 CharacterSetList uint32 MaximumCharacterSetList uint32 FileSetNumber uint32 FileSetDescriptorNumber uint32 LogicalVolumeIdentifierCharacterSet Charspec LogicalVolumeIdentifier string FileSetCharacterSet Charspec FileSetIdentifier string CopyrightFileIdentifier string AbstractFileIdentifier string RootDirectoryICB ExtentLong DomainIdentifier EntityID NextExtent ExtentLong SystemStreamDirectoryICB ExtentLong }
FileSetDescriptor Only one File Set Descriptor shall be recorded. On WORM media, multiple File Sets may be recorded.
func (*FileSetDescriptor) GetIdentifier ¶
func (d *FileSetDescriptor) GetIdentifier() int
func (*FileSetDescriptor) GetTag ¶
func (d *FileSetDescriptor) GetTag() *DescriptorTag
type ImageReader ¶
type ImageReader struct {
// contains filtered or unexported fields
}
func (*ImageReader) NewFileReader ¶
func (r *ImageReader) NewFileReader(file *FileInfo) (fileReader io.Reader, err error)
func (*ImageReader) ReadDir ¶
func (r *ImageReader) ReadDir(parent *FileInfo) (children []FileInfo, err error)
func (*ImageReader) RootDir ¶
func (r *ImageReader) RootDir() (fi *FileInfo, err error)
type ImplementationUse ¶
type ImplementationUseVolumeDescriptor ¶
type ImplementationUseVolumeDescriptor struct { Tag DescriptorTag VolumeDescriptorSequenceNumber uint32 ImplementationIdentifier EntityID ImplementationUse LVInformation }
ImplementationUseVolumeDescriptor shall be recorded on every Volume of a Volume Set. The Volume may also contain additional Implementation Use Volume Descriptors which are implementation specific. The intended purpose of this descriptor is to aid in the identification of a Volume within a Volume Set that belongs to a specific Logical Volume.
func (*ImplementationUseVolumeDescriptor) GetIdentifier ¶
func (d *ImplementationUseVolumeDescriptor) GetIdentifier() int
func (*ImplementationUseVolumeDescriptor) GetTag ¶
func (d *ImplementationUseVolumeDescriptor) GetTag() *DescriptorTag
type LVInformation ¶
type LogicalBlockAddress ¶
type LogicalVolumeDescriptor ¶
type LogicalVolumeDescriptor struct { Tag DescriptorTag VolumeDescriptorSequenceNumber uint32 DescriptorCharacterSet Charspec LogicalVolumeIdentifier string LogicalBlockSize uint32 DomainIdentifier EntityID LogicalVolumeContentsUse []byte MapTableLength uint32 NumberOfPartitionMaps uint32 ImplementationIdentifier EntityID ImplementationUse []byte IntegritySequenceExtent Extent PartitionMaps []PartitionMap }
func (*LogicalVolumeDescriptor) GetIdentifier ¶
func (d *LogicalVolumeDescriptor) GetIdentifier() int
func (*LogicalVolumeDescriptor) GetTag ¶
func (d *LogicalVolumeDescriptor) GetTag() *DescriptorTag
type LogicalVolumeHeaderDescriptor ¶
type LogicalVolumeHeaderDescriptor struct {
UniqueID uint64
}
type LogicalVolumeIntegrityDescriptor ¶
type LogicalVolumeIntegrityDescriptor struct { Tag DescriptorTag RecordingDateTime time.Time IntegrityType uint32 NextIntegrityExtent Extent LogicalVolumeContentsUse LogicalVolumeHeaderDescriptor NumberOfPartitions uint32 LengthOfImplementationUse uint32 FreeSpaceTable []uint32 SizeTable []uint32 ImplementationUse ImplementationUse }
func (*LogicalVolumeIntegrityDescriptor) GetIdentifier ¶
func (d *LogicalVolumeIntegrityDescriptor) GetIdentifier() int
func (*LogicalVolumeIntegrityDescriptor) GetTag ¶
func (d *LogicalVolumeIntegrityDescriptor) GetTag() *DescriptorTag
type PartitionDescriptor ¶
type PartitionDescriptor struct { Tag DescriptorTag VolumeDescriptorSequenceNumber uint32 PartitionFlags uint16 PartitionNumber uint16 PartitionContents EntityID PartitionContentsUse []byte AccessType uint32 PartitionStartingLocation uint32 PartitionLength uint32 ImplementationIdentifier EntityID ImplementationUse []byte }
PartitionDescriptor A Partition Access Type of Read-Only , Rewritable, Overwritable and WORM shall be supported. There shall be exactly one prevailing Partition Descriptor recorded per volume, with one exception. For Volume Sets that consist of single volume, the volume may contain 2 Partitions with 2 prevailing Partition Descriptors only if one has an access type of read only and the other has an access type of Rewritable or Overwritable. The Logical Volume for this volume would consist of the contents of both partitions.
func (*PartitionDescriptor) GetIdentifier ¶
func (d *PartitionDescriptor) GetIdentifier() int
func (*PartitionDescriptor) GetTag ¶
func (d *PartitionDescriptor) GetTag() *DescriptorTag
type PartitionMap ¶
type PrimaryVolumeDescriptor ¶
type PrimaryVolumeDescriptor struct { Tag DescriptorTag VolumeDescriptorSequenceNumber uint32 PrimaryVolumeDescriptorNumber uint32 VolumeIdentifier string VolumeSequenceNumber uint16 MaximumVolumeSequenceNumber uint16 InterchangeLevel uint16 MaximumInterchangeLevel uint16 CharacterSetList uint32 MaximumCharacterSetList uint32 VolumeSetIdentifier string DescriptorCharacterSet Charspec ExplanatoryCharacterSet Charspec VolumeAbstract Extent VolumeCopyrightNoticeExtent Extent ApplicationIdentifier EntityID RecordingDateTime time.Time ImplementationIdentifier EntityID ImplementationUse []byte PredecessorVolumeDescriptorSequenceLocation uint32 Flags uint16 }
PrimaryVolumeDescriptor There shall be exactly one prevailing Primary Volume Descriptor recorded per volume.
func (*PrimaryVolumeDescriptor) GetIdentifier ¶
func (d *PrimaryVolumeDescriptor) GetIdentifier() int
func (*PrimaryVolumeDescriptor) GetTag ¶
func (d *PrimaryVolumeDescriptor) GetTag() *DescriptorTag
type TerminatingDescriptor ¶
type TerminatingDescriptor struct {
Tag DescriptorTag
}
TerminatingDescriptor may be recorded to terminate a Volume Descriptor Sequence
func (*TerminatingDescriptor) GetIdentifier ¶
func (d *TerminatingDescriptor) GetIdentifier() int
func (*TerminatingDescriptor) GetTag ¶
func (d *TerminatingDescriptor) GetTag() *DescriptorTag
type UnallocatedSpaceDescriptor ¶
type UnallocatedSpaceDescriptor struct { Tag DescriptorTag VolumeDescriptorSequenceNumber uint32 NumberOfAllocationDescriptors uint32 AllocationDescriptors []Extent }
UnallocatedSpaceDescriptor shall be recorded, even if there is no free volume space. The first 32768 bytes of the Volume space shall not be used for the recording of ECMA 167 structures. This area shall not be referenced by the Unallocated Space Descriptor or any other ECMA 167 descriptor.
func (*UnallocatedSpaceDescriptor) GetIdentifier ¶
func (d *UnallocatedSpaceDescriptor) GetIdentifier() int
func (*UnallocatedSpaceDescriptor) GetTag ¶
func (d *UnallocatedSpaceDescriptor) GetTag() *DescriptorTag
type VolumeDescriptorPointer ¶
type VolumeDescriptorPointer struct { Tag DescriptorTag // This field shall specify the Volume Descriptor Sequence Number for this descriptor. VolumeDescriptorSequenceNumber uint32 // This field shall specify the next extent in the Volume Descriptor Sequence. If the extent's length is 0, no such //extent is specified. NextVolumeDescriptorSequenceExtent Extent }
func (*VolumeDescriptorPointer) GetIdentifier ¶
func (d *VolumeDescriptorPointer) GetIdentifier() int
func (*VolumeDescriptorPointer) GetTag ¶
func (d *VolumeDescriptorPointer) GetTag() *DescriptorTag