Documentation ¶
Index ¶
- func Abort(err error)
- func AddErrorInfo(err error, format string, args ...interface{}) error
- func CheckedMain(main_task_func Handler)
- func ClearBuffer(b []byte)
- func Concat(s1 []int64, s2 []int) []int64
- func DecodeInt(b []byte) int64
- func DecodeString(b []byte, sz int) string
- func DeferedCall(defered_func Handler)
- func DiscardPanic()
- func EnsureWrapped(err error) error
- func FillBuffer(b []byte, v byte)
- func FprintBytes(w io.Writer, b []byte)
- func FprintStruct(w io.Writer, value interface{})
- func GetDirectory() (string, error)
- func GetPartition() string
- func GetSource(err error) error
- func IsEof(err error) bool
- func IsWrapped(err error) bool
- func NewFileId() string
- func OnError(h func(error))
- func OpenFile(path string, mode OpenMode) (*os.File, error)
- func PrintBoot(disk_name string)
- func PrintBytes(b []byte)
- func PrintError(err error)
- func PrintStruct(value interface{})
- func Read(buffer []byte, data interface{}) error
- func ReadRecord(decoder IDecoder) (data.IDataRecord, error)
- func Recover(h func(error))
- func StringSize(s string) int
- func StructSize(value interface{}) int
- func ToBool(v string) (bool, error)
- func ToInt(v string) (int64, error)
- func WinDiskPath(letter rune) string
- func WrapError(err error) error
- func Write(writer io.Writer, data interface{}) error
- func WriteRecord(encoder IEncoder, record data.IDataRecord) error
- type Args
- func (self Args) Bool(key string) bool
- func (self Args) BoolDef(key string, default_value bool) bool
- func (self Args) BoolExt(key string) (bool, bool)
- func (self Args) BoolFull(key string) (bool, bool, error)
- func (self Args) Idx(key string) int64
- func (self Args) IdxDef(key string, default_value int64) int64
- func (self Args) IdxExt(key string) (int64, bool)
- func (self Args) IdxFull(key string) (int64, bool, error)
- func (self Args) Int(key string) int64
- func (self Args) IntDef(key string, default_value int64) int64
- func (self Args) IntExt(key string) (int64, bool)
- func (self Args) IntFull(key string) (int64, bool, error)
- type AttrFlag
- type AttributeDefinition
- type AttributeDesc
- type AttributeHeader
- type AttributeListAttribute
- type AttributeType
- type AttributeTypeFilter
- type AttributeValue
- func (self *AttributeValue) GetFilename() string
- func (self *AttributeValue) GetFirstEntry() (*DirectoryEntry, error)
- func (self *AttributeValue) GetIndexBlock(entry_position uint) (IndexValue, error)
- func (self *AttributeValue) GetIndexBlockFromEntry(entry *DirectoryEntry) (IndexValue, error)
- func (self *AttributeValue) GetNextEntry(entry *DirectoryEntry) (*DirectoryEntry, error)
- func (self *AttributeValue) GetParent() data.FileRef
- func (self *AttributeValue) IsLongName() bool
- type Boolean
- type BootBlock
- type BootCode
- type BootFormat
- type Byte
- type Char
- type ClusterNumber
- type DataZone
- type DirEntryFlag
- type DirFlag
- type DirectoryEntry
- type DirectoryEntryExtendedHeader
- type DirectoryEntryHeader
- func (self *DirectoryEntryHeader) DecodeFilename(data []byte) string
- func (self *DirectoryEntryHeader) ExtendsHeader() *DirectoryEntryExtendedHeader
- func (self *DirectoryEntryHeader) ExtendsHeaderFromData(data []byte) (*DirectoryEntryExtendedHeader, error)
- func (self *DirectoryEntryHeader) ExtendsHeaderWithVcn(vcn ClusterNumber) *DirectoryEntryExtendedHeader
- func (self *DirectoryEntryHeader) MakeEntry(block_offset, entry_offset uint) *DirectoryEntry
- type DirectoryIndex
- type DiskIO
- func (self *DiskIO) Close() error
- func (self *DiskIO) GetOffset() int64
- func (self *DiskIO) ReadCluster(position int64, data []byte) error
- func (self *DiskIO) ReadClusters(position, count int64, data []byte) error
- func (self *DiskIO) ReadSector(position int64, data []byte) error
- func (self *DiskIO) ReadSectors(position, count int64, data []byte) error
- func (self *DiskIO) ReadStruct(position int64, ptr interface{}) error
- func (self *DiskIO) SetOffset(offset int64)
- func (self *DiskIO) Shift(offset int64) *DiskIO
- type EaAttribute
- type EaInformationAttribute
- type FileAttrFlag
- type FileFlag
- type FileRecord
- func (self *FileRecord) FileRef() data.FileRef
- func (self *FileRecord) GetAttributeFilteredList(attr_type AttributeType, other_types ...AttributeType) []int
- func (self *FileRecord) GetAttributes(filter bool) (map[int]*AttributeHeader, error)
- func (self *FileRecord) GetFilename(disk *DiskIO) (string, error)
- func (self *FileRecord) IsDir() bool
- func (self *FileRecord) MakeAttributeFromHeader(header *AttributeHeader) (*AttributeDesc, error)
- func (self *FileRecord) MakeAttributeFromOffset(offset int) (*AttributeDesc, error)
- func (self *FileRecord) PrefixSize() int
- type FileRecordData
- type FilenameAttribute
- type Handler
- type IDecoder
- type IEncoder
- type IndexBlockHeader
- type IndexRootAttribute
- type IndexType
- type IndexValue
- type NameType
- type NonResidentAttribute
- type OpenMode
- type RecordHeader
- type RecordType
- type ReparsePointAttribute
- type ResidentAttrFlag
- type ResidentAttribute
- type RunEntry
- type RunList
- type StandardInformationAttribute
- type Timestamp
- type Usn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddErrorInfo ¶
func CheckedMain ¶
func CheckedMain(main_task_func Handler)
func ClearBuffer ¶
func ClearBuffer(b []byte)
func DecodeString ¶
func DeferedCall ¶
func DeferedCall(defered_func Handler)
func DiscardPanic ¶
func DiscardPanic()
func EnsureWrapped ¶
func FillBuffer ¶
func FprintBytes ¶
func FprintStruct ¶
func GetDirectory ¶
func GetPartition ¶
func GetPartition() string
func PrintBytes ¶
func PrintBytes(b []byte)
func PrintError ¶
func PrintError(err error)
func PrintStruct ¶
func PrintStruct(value interface{})
func ReadRecord ¶
func ReadRecord(decoder IDecoder) (data.IDataRecord, error)
func StringSize ¶
func StructSize ¶
func StructSize(value interface{}) int
func WinDiskPath ¶
func WriteRecord ¶
func WriteRecord(encoder IEncoder, record data.IDataRecord) error
Types ¶
type AttributeDefinition ¶
type AttributeDesc ¶
type AttributeDesc struct { Record *FileRecord Header *AttributeHeader Index int Name string Desc interface{} RunList RunList }
func (*AttributeDesc) GetRunList ¶
func (self *AttributeDesc) GetRunList() RunList
func (*AttributeDesc) GetSize ¶
func (self *AttributeDesc) GetSize() uint64
func (*AttributeDesc) GetValue ¶
func (self *AttributeDesc) GetValue(io *DiskIO) (*AttributeValue, error)
func (*AttributeDesc) NonResidentDesc ¶
func (self *AttributeDesc) NonResidentDesc() *NonResidentAttribute
func (*AttributeDesc) ResidentDesc ¶
func (self *AttributeDesc) ResidentDesc() *ResidentAttribute
type AttributeHeader ¶
type AttributeListAttribute ¶
type AttributeListAttribute struct { AttributeType AttributeType Length uint16 NameLength uint8 NameOffset uint8 LowVcn ClusterNumber FileReferenceNumber uint64 AttributeNumber uint16 AlignmentOrReserved [3]uint16 }
type AttributeType ¶
type AttributeType uint32
const ( ATTR_NONE AttributeType = 0x00000000 ATTR_STANDARD_INFORMATION AttributeType = 0x00000010 ATTR_ATTRIBUTE_LIST AttributeType = 0x00000020 ATTR_FILE_NAME AttributeType = 0x00000030 ATTR_OBJECT_ID AttributeType = 0x00000040 ATTR_SECURITY_DESCRIPTOR AttributeType = 0x00000050 ATTR_VOLUME_NAME AttributeType = 0x00000060 ATTR_VOLUME_INFORMATION AttributeType = 0x00000070 ATTR_DATA AttributeType = 0x00000080 ATTR_INDEX_ROOT AttributeType = 0x00000090 ATTR_INDEX_ALLOCATION AttributeType = 0x000000A0 ATTR_BITMAP AttributeType = 0x000000B0 ATTR_REPARSE_POINT AttributeType = 0x000000C0 ATTR_EA_INFORMATION AttributeType = 0x000000D0 ATTR_EA AttributeType = 0x000000E0 ATTR_PROPERTY_SET AttributeType = 0x000000F0 ATTR_LOGGED_UTILITY_STREAM AttributeType = 0x00000100 ATTR_END_OF_ATTRIBUTES AttributeType = 0xFFFFFFFF )
func (AttributeType) IsGood ¶
func (self AttributeType) IsGood() bool
func (AttributeType) NewAttribute ¶
func (self AttributeType) NewAttribute() interface{}
func (AttributeType) String ¶
func (self AttributeType) String() string
type AttributeTypeFilter ¶
type AttributeTypeFilter map[AttributeType]bool
func MakeAttributeTypeFilter ¶
func MakeAttributeTypeFilter(first AttributeType, others []AttributeType) AttributeTypeFilter
type AttributeValue ¶
type AttributeValue struct { Desc *AttributeDesc FirstLCN ClusterNumber Content DataZone Data DataZone Size int Value interface{} }
func (*AttributeValue) GetFilename ¶
func (self *AttributeValue) GetFilename() string
func (*AttributeValue) GetFirstEntry ¶
func (self *AttributeValue) GetFirstEntry() (*DirectoryEntry, error)
func (*AttributeValue) GetIndexBlock ¶
func (self *AttributeValue) GetIndexBlock(entry_position uint) (IndexValue, error)
func (*AttributeValue) GetIndexBlockFromEntry ¶
func (self *AttributeValue) GetIndexBlockFromEntry(entry *DirectoryEntry) (IndexValue, error)
func (*AttributeValue) GetNextEntry ¶
func (self *AttributeValue) GetNextEntry(entry *DirectoryEntry) (*DirectoryEntry, error)
func (*AttributeValue) GetParent ¶
func (self *AttributeValue) GetParent() data.FileRef
func (*AttributeValue) IsLongName ¶
func (self *AttributeValue) IsLongName() bool
type BootBlock ¶
type BootBlock struct { Jump [3]Byte Format BootFormat BytesPerSector uint16 SectorsPerCluster uint8 BootSectors uint16 Mbz1 uint8 Mbz2 uint16 Reserved1 uint16 MediaType uint8 Mbz3 uint16 SectorsPerTrack uint16 NumberOfHeads uint16 PartitionOffset uint32 Reserved2 [2]uint32 TotalSectors uint64 MftStartLcn ClusterNumber Mft2StartLcn ClusterNumber ClustersPerFileRecord uint32 ClustersPerIndexBlock uint32 VolumeSerialNumber uint64 Code BootCode BootSignature uint16 }
type BootFormat ¶
type BootFormat [8]byte
func (BootFormat) String ¶
func (bf BootFormat) String() string
type ClusterNumber ¶
type ClusterNumber uint64
func (ClusterNumber) GetPosition ¶
func (self ClusterNumber) GetPosition(d *DiskIO) int64
func (ClusterNumber) String ¶
func (self ClusterNumber) String() string
type DirEntryFlag ¶
type DirEntryFlag uint32
const ( DEFLAG_NONE DirEntryFlag = iota DEFLAG_HAS_TRAILING DEFLAG_LAST_ENTRY )
func (DirEntryFlag) String ¶
func (self DirEntryFlag) String() string
type DirectoryEntry ¶
type DirectoryEntry struct { DirectoryEntryExtendedHeader Index *DirectoryIndex Name string BlockOffset uint EntryOffset uint }
type DirectoryEntryExtendedHeader ¶
type DirectoryEntryExtendedHeader struct { DirectoryEntryHeader Vcn ClusterNumber // VCN in IndexAllocation of earlier entries }
func (*DirectoryEntryExtendedHeader) MakeEntry ¶
func (self *DirectoryEntryExtendedHeader) MakeEntry(block_offset, entry_offset uint) *DirectoryEntry
type DirectoryEntryHeader ¶
type DirectoryEntryHeader struct { FileReferenceNumber data.FileRef Length uint16 AttributeLength uint16 Flags DirEntryFlag ParentFileRefNum data.FileRef CreationTime Timestamp LastModifiedTime Timestamp MFTRecordChangeTime Timestamp LastAccessTime Timestamp PhysicalSize uint64 LogicalSize uint64 FileFlags FileAttrFlag ExtendedAttributes uint32 FilenameLength uint8 FilenameType uint8 }
func (*DirectoryEntryHeader) DecodeFilename ¶
func (self *DirectoryEntryHeader) DecodeFilename(data []byte) string
func (*DirectoryEntryHeader) ExtendsHeader ¶
func (self *DirectoryEntryHeader) ExtendsHeader() *DirectoryEntryExtendedHeader
func (*DirectoryEntryHeader) ExtendsHeaderFromData ¶
func (self *DirectoryEntryHeader) ExtendsHeaderFromData(data []byte) (*DirectoryEntryExtendedHeader, error)
func (*DirectoryEntryHeader) ExtendsHeaderWithVcn ¶
func (self *DirectoryEntryHeader) ExtendsHeaderWithVcn(vcn ClusterNumber) *DirectoryEntryExtendedHeader
func (*DirectoryEntryHeader) MakeEntry ¶
func (self *DirectoryEntryHeader) MakeEntry(block_offset, entry_offset uint) *DirectoryEntry
type DirectoryIndex ¶
type DiskIO ¶
type DiskIO struct {
// contains filtered or unexported fields
}
func (*DiskIO) ReadClusters ¶
func (*DiskIO) ReadSectors ¶
func (*DiskIO) ReadStruct ¶
type EaAttribute ¶
type EaInformationAttribute ¶
type FileAttrFlag ¶
type FileAttrFlag uint32
const ( FAFLAG_NONE FileAttrFlag = 0x00000000 FAFLAG_READONLY FileAttrFlag = 0x00000001 FAFLAG_HIDDEN FileAttrFlag = 0x00000002 FAFLAG_SYSTEM FileAttrFlag = 0x00000004 FAFLAG_DIRECTORY FileAttrFlag = 0x00000010 FAFLAG_ARCHIVE FileAttrFlag = 0x00000020 FAFLAG_DEVICE FileAttrFlag = 0x00000040 FAFLAG_NORMAL FileAttrFlag = 0x00000080 FAFLAG_TEMPORARY FileAttrFlag = 0x00000100 FAFLAG_SPARSE_FILE FileAttrFlag = 0x00000200 FAFLAG_REPARSE_POINT FileAttrFlag = 0x00000400 FAFLAG_COMPRESSED FileAttrFlag = 0x00000800 FAFLAG_OFFLINE FileAttrFlag = 0x00001000 FAFLAG_NOT_CONTENT_INDEXED FileAttrFlag = 0x00002000 FAFLAG_ENCRYPTED FileAttrFlag = 0x00004000 FAFLAG_INTEGRITY_STREAM FileAttrFlag = 0x00008000 FAFLAG_VIRTUAL FileAttrFlag = 0x00010000 FAFLAG_NO_SCRUB_DATA FileAttrFlag = 0x00020000 FAFLAG_DUP_FNAME_INDEX_PRESENT FileAttrFlag = 0x10000000 FAFLAG_DUP_VIEW_INDEX_PRESENT FileAttrFlag = 0x20000000 )
func (FileAttrFlag) String ¶
func (self FileAttrFlag) String() string
type FileRecord ¶
type FileRecord struct { RecordHeader SequenceNumber uint16 LinkCount uint16 AttributesOffset uint16 Flags FileFlag BytesInUse uint32 BytesAllocated uint32 BaseFileRecord uint64 NextAttributeNumber uint16 Reserved uint16 MftRecordNumber uint32 Data FileRecordData }
func (*FileRecord) FileRef ¶
func (self *FileRecord) FileRef() data.FileRef
func (*FileRecord) GetAttributeFilteredList ¶
func (self *FileRecord) GetAttributeFilteredList(attr_type AttributeType, other_types ...AttributeType) []int
func (*FileRecord) GetAttributes ¶
func (self *FileRecord) GetAttributes(filter bool) (map[int]*AttributeHeader, error)
func (*FileRecord) GetFilename ¶
func (self *FileRecord) GetFilename(disk *DiskIO) (string, error)
func (*FileRecord) IsDir ¶
func (self *FileRecord) IsDir() bool
func (*FileRecord) MakeAttributeFromHeader ¶
func (self *FileRecord) MakeAttributeFromHeader(header *AttributeHeader) (*AttributeDesc, error)
func (*FileRecord) MakeAttributeFromOffset ¶
func (self *FileRecord) MakeAttributeFromOffset(offset int) (*AttributeDesc, error)
func (*FileRecord) PrefixSize ¶
func (self *FileRecord) PrefixSize() int
type FileRecordData ¶
type FileRecordData [976]byte
func (FileRecordData) String ¶
func (FileRecordData) String() string
type FilenameAttribute ¶
type IndexBlockHeader ¶
type IndexBlockHeader struct { RecordHeader IndexBlockVcn ClusterNumber DirectoryIndex DirectoryIndex }
func (*IndexBlockHeader) Entries ¶
func (self *IndexBlockHeader) Entries(data []byte) (map[int]*DirectoryEntryExtendedHeader, error)
func (*IndexBlockHeader) IndexType ¶
func (*IndexBlockHeader) IndexType() IndexType
func (*IndexBlockHeader) PrefixSize ¶
func (self *IndexBlockHeader) PrefixSize() int
type IndexRootAttribute ¶
type IndexRootAttribute struct { Type AttributeType CollationRule uint32 BytesPerIndexBlock uint32 ClustersPerIndexBlock uint32 DirectoryIndex DirectoryIndex }
func (*IndexRootAttribute) IndexType ¶
func (*IndexRootAttribute) IndexType() IndexType
type IndexValue ¶
type IndexValue interface {
IndexType() IndexType
}
type NonResidentAttribute ¶
type NonResidentAttribute struct { AttributeHeader LowVcn ClusterNumber HighVcn ClusterNumber RunArrayOffset uint16 CompressionUnit uint8 AlignmentOrReserved [5]uint8 AllocatedSize uint64 DataSize uint64 InitializedSize uint64 CompressedSize uint64 }
type RecordHeader ¶
type RecordHeader struct { Type RecordType UsaOffset uint16 UsaCount uint16 Usn Usn }
type RecordType ¶
type RecordType uint32
const ( RECTYP_NONE RecordType = 0x00000000 RECTYP_FILE RecordType = 0x454C4946 // 'FILE' RECTYP_INDX RecordType = 0x58444E49 // 'INDX' RECTYP_BAAD RecordType = 0x44414142 // 'BAAD' RECTYP_HOLE RecordType = 0x454C4F48 // 'HOLE' RECTYP_CHKD RecordType = 0x444B4843 // 'CHKD' )
func RecordTypeFromBytes ¶
func RecordTypeFromBytes(s []byte) RecordType
func RecordTypeFromString ¶
func RecordTypeFromString(s string) RecordType
func (RecordType) Bytes ¶
func (self RecordType) Bytes() ([]byte, error)
func (RecordType) IsGood ¶
func (self RecordType) IsGood() bool
func (RecordType) String ¶
func (self RecordType) String() string
type ReparsePointAttribute ¶
type ResidentAttrFlag ¶
type ResidentAttrFlag uint16
const ( RAFLAG_NONE ResidentAttrFlag = iota RAFLAG_INDEXED )
type ResidentAttribute ¶
type ResidentAttribute struct { AttributeHeader ValueLength uint32 ValueOffset uint16 Flags ResidentAttrFlag }
type RunEntry ¶
type RunEntry struct { Start ClusterNumber Count int64 Zero bool }
func (*RunEntry) GetLast ¶
func (self *RunEntry) GetLast() ClusterNumber
func (*RunEntry) GetNext ¶
func (self *RunEntry) GetNext() ClusterNumber
Source Files ¶
Click to show internal directories.
Click to hide internal directories.