Documentation ¶
Overview ¶
Package fileref provides a unified representation of 64-bit and 128-bit file identifiers used in NTFS and ReFS file systems.
New identifiers are created by calling New64, New128, BigEndian or LittleEndian.
Index ¶
Constants ¶
const ( FileType = iota ObjectIDType ExtendedFileIDType )
File ID discriminator
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Descriptor ¶
Descriptor is a file reference descriptor that can be used in file system API calls.
type ID ¶
type ID [16]byte
ID is a file identifer capable of holding 64-bit and 128-bit values.
ID is stored as a big-endian byte sequence. NTFS and ReFS use a little-endian byte sequence, so the LittleEndian function should be used to create identifiers for byte sequences taken from those file systems.
func BigEndian ¶
BigEndian creates a file identifier from a sequence of bytes in big-endian byte order.
func LittleEndian ¶
LittleEndian creates a file identifier from a sequence of bytes in little-endian byte order.
func (ID) Descriptor ¶
func (id ID) Descriptor() Descriptor
Descriptor returns a descriptor for the file id.
func (ID) Int64 ¶
Int64 returns the file identifier as a 64-bit signed integer if it can be represented as one. If it cannot, -1 is returned.
func (ID) IsInt64 ¶
IsInt64 returns true if the file identifier can be represented as a 64-bit signed integer.
func (ID) LittleEndian ¶
LittleEndian returns the ID as a sequence of bytes in little-endian byte order.