Documentation ¶
Index ¶
- Constants
- type AED
- type AllocationType
- type AnchorVolumeDescriptorPointer
- type Descriptor
- func (d *Descriptor) AnchorVolumeDescriptorPointer() *AnchorVolumeDescriptorPointer
- func (d *Descriptor) Checksum() (checksum uint8)
- func (d *Descriptor) Data() []byte
- func (d *Descriptor) FileEntry() FileEntryInterface
- func (d *Descriptor) FileIdentifierDescriptor() *FileIdentifierDescriptor
- func (d *Descriptor) FileSetDescriptor() *FileSetDescriptor
- func (d *Descriptor) FromBytes(b []byte) *Descriptor
- func (d *Descriptor) LogicalVolumeDescriptor() *LogicalVolumeDescriptor
- func (d *Descriptor) PartitionDescriptor() *PartitionDescriptor
- func (d *Descriptor) PrimaryVolumeDescriptor() *PrimaryVolumeDescriptor
- type EntityID
- type ExtendedFileEntry
- type Extent
- type ExtentExtended
- type ExtentInterface
- type ExtentLong
- type ExtentSmall
- type File
- func (f *File) FileEntry() FileEntryInterface
- func (f *File) GetFileEntryPosition() int64
- func (f *File) IsDir() bool
- func (f *File) ModTime() time.Time
- func (f *File) Mode() os.FileMode
- func (f *File) Name() string
- func (f *File) NewReader() *MultiSectionReader
- func (f *File) ReadDir() []File
- func (f *File) Size() int64
- func (f *File) Sys() interface{}
- type FileEntry
- func (fe *FileEntry) FromBytes(b []byte) *FileEntry
- func (fe *FileEntry) GetAllocationDescriptors() (list []ExtentInterface)
- func (fe *FileEntry) GetICBTag() *ICBTag
- func (fe *FileEntry) GetInformationLength() uint64
- func (fe *FileEntry) GetModificationTime() time.Time
- func (fe *FileEntry) GetPartition() uint16
- func (fe *FileEntry) GetPermissions() uint32
- type FileEntryInterface
- type FileIdentifierDescriptor
- type FileSetDescriptor
- type ICBTag
- type LbAddr
- type LogicalVolumeDescriptor
- type MultiSectionReader
- type PartitionDescriptor
- type PartitionMap
- type PrimaryVolumeDescriptor
- type Udf
- func (udf *Udf) GetReader() io.ReaderAt
- func (udf *Udf) LogicalPartitionStart(partition uint16) (logical uint64)
- func (udf *Udf) PhysicalPartitionStart(partition uint16) (physical uint64)
- func (udf *Udf) ReadDir(fe FileEntryInterface) []File
- func (udf *Udf) ReadSector(sectorNumber uint64) []byte
- func (udf *Udf) ReadSectors(sectorNumber uint64, sectorsCount uint64) []byte
Constants ¶
View Source
const ( DESCRIPTOR_PRIMARY_VOLUME = 0x1 DESCRIPTOR_ANCHOR_VOLUME_POINTER = 0x2 DESCRIPTOR_VOLUME_POINTER = 0x3 DESCRIPTOR_IMPLEMENTATION_USE_VOLUME = 0x4 DESCRIPTOR_PARTITION = 0x5 DESCRIPTOR_LOGICAL_VOLUME = 0x6 DESCRIPTOR_UNALLOCATED = 0x7 DESCRIPTOR_TERMINATING = 0x8 DESCRIPTOR_FILE_SET = 0x100 DESCRIPTOR_IDENTIFIER = 0x101 DESCRIPTOR_ALLOCATION_EXTENT = 0x102 DESCRIPTOR_INDIRECT_ENTRY = 0x103 DESCRIPTOR_TERMINAL_ENTRY = 0x104 DESCRIPTOR_FILE_ENTRY = 0x105 UDF_EXTENT_FLAG_MASK = 0xC0000000 EXT_NOT_RECORDED_ALLOCATED = 0x40000000 EXT_NOT_RECORDED_NOT_ALLOCATED = 0x80000000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AED ¶
type AED struct { Descriptor Descriptor PreviousAllocationExtentLocation uint32 LengthOfAllocationDescriptors uint32 }
type AllocationType ¶
type AllocationType int
const ( ShortDescriptors AllocationType = iota LongDescriptors ExtendedDescriptors Embedded )
type AnchorVolumeDescriptorPointer ¶
type AnchorVolumeDescriptorPointer struct { Descriptor Descriptor MainVolumeDescriptorSeq Extent ReserveVolumeDescriptorSeq Extent }
func NewAnchorVolumeDescriptorPointer ¶
func NewAnchorVolumeDescriptorPointer(b []byte) *AnchorVolumeDescriptorPointer
func (*AnchorVolumeDescriptorPointer) FromBytes ¶
func (ad *AnchorVolumeDescriptorPointer) FromBytes(b []byte) *AnchorVolumeDescriptorPointer
type Descriptor ¶
type Descriptor struct { TagIdentifier uint16 DescriptorVersion uint16 TagChecksum uint8 TagSerialNumber uint16 DescriptorCRC uint16 DescriptorCRCLength uint16 TagLocation uint32 // contains filtered or unexported fields }
func NewDescriptor ¶
func NewDescriptor(b []byte) *Descriptor
func (*Descriptor) AnchorVolumeDescriptorPointer ¶
func (d *Descriptor) AnchorVolumeDescriptorPointer() *AnchorVolumeDescriptorPointer
func (*Descriptor) Checksum ¶
func (d *Descriptor) Checksum() (checksum uint8)
func (*Descriptor) Data ¶
func (d *Descriptor) Data() []byte
func (*Descriptor) FileEntry ¶
func (d *Descriptor) FileEntry() FileEntryInterface
func (*Descriptor) FileIdentifierDescriptor ¶
func (d *Descriptor) FileIdentifierDescriptor() *FileIdentifierDescriptor
func (*Descriptor) FileSetDescriptor ¶
func (d *Descriptor) FileSetDescriptor() *FileSetDescriptor
func (*Descriptor) FromBytes ¶
func (d *Descriptor) FromBytes(b []byte) *Descriptor
func (*Descriptor) LogicalVolumeDescriptor ¶
func (d *Descriptor) LogicalVolumeDescriptor() *LogicalVolumeDescriptor
func (*Descriptor) PartitionDescriptor ¶
func (d *Descriptor) PartitionDescriptor() *PartitionDescriptor
func (*Descriptor) PrimaryVolumeDescriptor ¶
func (d *Descriptor) PrimaryVolumeDescriptor() *PrimaryVolumeDescriptor
type EntityID ¶
func NewEntityID ¶
type ExtendedFileEntry ¶
type ExtendedFileEntry struct { FileEntry CreationTime time.Time ObjectSize uint64 StreamDirectoryIcb ExtentLong }
func (*ExtendedFileEntry) FromBytes ¶
func (fe *ExtendedFileEntry) FromBytes(b []byte) *ExtendedFileEntry
type Extent ¶
func (Extent) GetLocation ¶
func (Extent) GetPartition ¶
func (Extent) HasExtended ¶
func (Extent) IsNotRecorded ¶
type ExtentExtended ¶
type ExtentExtended struct { ExtentLength uint32 RecordedLength uint32 InfoLength uint32 Location LbAddr }
func NewExtentExtended ¶
func NewExtentExtended(b []byte) ExtentExtended
func (ExtentExtended) GetLength ¶
func (e ExtentExtended) GetLength() uint32
func (ExtentExtended) GetLocation ¶
func (e ExtentExtended) GetLocation() uint64
func (ExtentExtended) GetPartition ¶
func (e ExtentExtended) GetPartition() uint16
func (ExtentExtended) HasExtended ¶
func (e ExtentExtended) HasExtended() bool
func (ExtentExtended) IsNotRecorded ¶
func (e ExtentExtended) IsNotRecorded() bool
func (ExtentExtended) SetLength ¶
func (e ExtentExtended) SetLength(length uint32)
type ExtentInterface ¶
type ExtentInterface interface { GetLocation() uint64 GetLength() uint32 SetLength(uint32) GetPartition() uint16 IsNotRecorded() bool HasExtended() bool }
func GetAllocationDescriptor ¶
func GetAllocationDescriptor(t AllocationType, b []byte) ExtentInterface
func GetAllocationDescriptors ¶
func GetAllocationDescriptors(t AllocationType, b []byte, len uint32) (list []ExtentInterface)
type ExtentLong ¶
func NewExtentLong ¶
func NewExtentLong(b []byte) ExtentLong
func (ExtentLong) GetLength ¶
func (e ExtentLong) GetLength() uint32
func (ExtentLong) GetLocation ¶
func (e ExtentLong) GetLocation() uint64
func (ExtentLong) GetPartition ¶
func (e ExtentLong) GetPartition() uint16
func (ExtentLong) HasExtended ¶
func (e ExtentLong) HasExtended() bool
func (ExtentLong) IsNotRecorded ¶
func (e ExtentLong) IsNotRecorded() bool
func (ExtentLong) SetLength ¶
func (e ExtentLong) SetLength(length uint32)
type ExtentSmall ¶
func NewExtentSmall ¶
func NewExtentSmall(b []byte) ExtentSmall
func (ExtentSmall) GetLength ¶
func (e ExtentSmall) GetLength() uint32
func (ExtentSmall) GetLocation ¶
func (e ExtentSmall) GetLocation() uint64
func (ExtentSmall) GetPartition ¶
func (e ExtentSmall) GetPartition() uint16
func (ExtentSmall) HasExtended ¶
func (e ExtentSmall) HasExtended() bool
func (ExtentSmall) IsNotRecorded ¶
func (e ExtentSmall) IsNotRecorded() bool
func (ExtentSmall) SetLength ¶
func (e ExtentSmall) SetLength(length uint32)
type File ¶
type File struct { Udf *Udf Fid *FileIdentifierDescriptor // contains filtered or unexported fields }
File is a os.FileInfo-compatible wrapper around an ISO-13346 "UDF" directory entry
func (*File) FileEntry ¶
func (f *File) FileEntry() FileEntryInterface
func (*File) GetFileEntryPosition ¶
func (*File) Mode ¶
Mode returns os.FileMode flag set with the os.ModeDir flag enabled in case of directories
func (*File) NewReader ¶
func (f *File) NewReader() *MultiSectionReader
type FileEntry ¶
type FileEntry struct { Descriptor Descriptor ICBTag *ICBTag Uid uint32 Gid uint32 Permissions uint32 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 []byte // Manual field Partition uint16 }
func (*FileEntry) GetAllocationDescriptors ¶
func (fe *FileEntry) GetAllocationDescriptors() (list []ExtentInterface)
func (*FileEntry) GetInformationLength ¶
func (*FileEntry) GetModificationTime ¶
func (*FileEntry) GetPartition ¶
func (*FileEntry) GetPermissions ¶
type FileEntryInterface ¶
type FileEntryInterface interface { GetAllocationDescriptors() []ExtentInterface GetPermissions() uint32 GetInformationLength() uint64 GetModificationTime() time.Time GetICBTag() *ICBTag GetPartition() uint16 }
func NewFileEntry ¶
func NewFileEntry(partition uint16, b []byte) (fe FileEntryInterface)
type FileIdentifierDescriptor ¶
type FileIdentifierDescriptor struct { Descriptor Descriptor FileVersionNumber uint16 FileCharacteristics uint8 LengthOfFileIdentifier uint8 ICB ExtentLong LengthOfImplementationUse uint16 ImplementationUse EntityID FileIdentifier string }
func NewFileIdentifierDescriptor ¶
func NewFileIdentifierDescriptor(b []byte) *FileIdentifierDescriptor
func (*FileIdentifierDescriptor) FromBytes ¶
func (fid *FileIdentifierDescriptor) FromBytes(b []byte) *FileIdentifierDescriptor
func (*FileIdentifierDescriptor) Len ¶
func (fid *FileIdentifierDescriptor) Len() uint64
type FileSetDescriptor ¶
type FileSetDescriptor struct { Descriptor Descriptor RecordingDateTime time.Time InterchangeLevel uint16 MaximumInterchangeLevel uint16 CharacterSetList uint32 MaximumCharacterSetList uint32 FileSetNumber uint32 FileSetDescriptorNumber uint32 LogicalVolumeIdentifier string FileSetIdentifier string CopyrightFileIdentifier string AbstractFileIdentifier string RootDirectoryICB ExtentLong DomainIdentifier EntityID NexExtent ExtentLong }
func NewFileSetDescriptor ¶
func NewFileSetDescriptor(b []byte) *FileSetDescriptor
func (*FileSetDescriptor) FromBytes ¶
func (fsd *FileSetDescriptor) FromBytes(b []byte) *FileSetDescriptor
type ICBTag ¶
type LogicalVolumeDescriptor ¶
type LogicalVolumeDescriptor struct { Descriptor Descriptor VolumeDescriptorSequenceNumber uint32 LogicalVolumeIdentifier string LogicalBlockSize uint32 DomainIdentifier EntityID LogicalVolumeContentsUse ExtentLong MapTableLength uint32 NumberOfPartitionMaps uint32 ImplementationIdentifier EntityID ImplementationUse []byte IntegritySequenceExtent Extent PartitionMaps []PartitionMap }
func NewLogicalVolumeDescriptor ¶
func NewLogicalVolumeDescriptor(b []byte) *LogicalVolumeDescriptor
func (*LogicalVolumeDescriptor) FromBytes ¶
func (lvd *LogicalVolumeDescriptor) FromBytes(b []byte) *LogicalVolumeDescriptor
type MultiSectionReader ¶
type MultiSectionReader struct {
// contains filtered or unexported fields
}
func (*MultiSectionReader) ReadAt ¶
func (r *MultiSectionReader) ReadAt(p []byte, off int64) (n int, err error)
func (*MultiSectionReader) Seek ¶
func (r *MultiSectionReader) Seek(offset int64, whence int) (n int64, err error)
func (*MultiSectionReader) Size ¶
func (r *MultiSectionReader) Size() int64
type PartitionDescriptor ¶
type PartitionDescriptor struct { Descriptor Descriptor VolumeDescriptorSequenceNumber uint32 PartitionFlags uint16 PartitionNumber uint16 PartitionContents EntityID PartitionContentsUse []byte AccessType uint32 PartitionStartingLocation uint32 PartitionLength uint32 ImplementationIdentifier EntityID ImplementationUse []byte }
func NewPartitionDescriptor ¶
func NewPartitionDescriptor(b []byte) *PartitionDescriptor
func (*PartitionDescriptor) FromBytes ¶
func (pd *PartitionDescriptor) FromBytes(b []byte) *PartitionDescriptor
type PartitionMap ¶
type PartitionMap struct { PartitionMapType uint8 PartitionMapLength uint8 VolumeSequenceNumber uint16 PartitionNumber uint16 PartitionStart uint32 }
func (*PartitionMap) FromBytes ¶
func (pm *PartitionMap) FromBytes(b []byte) *PartitionMap
type PrimaryVolumeDescriptor ¶
type PrimaryVolumeDescriptor struct { Descriptor Descriptor VolumeDescriptorSequenceNumber uint32 PrimaryVolumeDescriptorNumber uint32 VolumeIdentifier string VolumeSequenceNumber uint16 MaximumVolumeSequenceNumber uint16 InterchangeLevel uint16 MaximumInterchangeLevel uint16 CharacterSetList uint32 MaximumCharacterSetList uint32 VolumeSetIdentifier string VolumeAbstract Extent VolumeCopyrightNoticeExtent Extent ApplicationIdentifier EntityID RecordingDateTime time.Time ImplementationIdentifier EntityID ImplementationUse []byte PredecessorVolumeDescriptorSequenceLocation uint32 Flags uint16 }
func NewPrimaryVolumeDescriptor ¶
func NewPrimaryVolumeDescriptor(b []byte) *PrimaryVolumeDescriptor
func (*PrimaryVolumeDescriptor) FromBytes ¶
func (pvd *PrimaryVolumeDescriptor) FromBytes(b []byte) *PrimaryVolumeDescriptor
type Udf ¶
type Udf struct { SECTOR_SIZE uint64 // contains filtered or unexported fields }
Udf is a wrapper around an .iso file that allows reading its ISO-13346 "UDF" data
func NewUdfFromReader ¶
NewUdfFromReader returns an Udf reader reading from a given file
func (*Udf) LogicalPartitionStart ¶
func (*Udf) PhysicalPartitionStart ¶
XXX - unused
func (*Udf) ReadDir ¶
func (udf *Udf) ReadDir(fe FileEntryInterface) []File
func (*Udf) ReadSector ¶
Click to show internal directories.
Click to hide internal directories.