Documentation
¶
Index ¶
- Constants
- func Dump(r io.Reader) (string, error)
- func MacTime(t uint32) time.Time
- func MakePrefix(records map[int][]byte, rforkSize, rForkMinOffset int64) (buf []byte, rForkOffset int64)
- func Sidecar(name string) string
- type AppleDouble
- func (m *AppleDouble) ForDir() (func() (io.Reader, error), int64)
- func (m *AppleDouble) LoadDInfo(d *[16]byte)
- func (m *AppleDouble) LoadDXInfo(d *[16]byte)
- func (m *AppleDouble) LoadFInfo(d *[16]byte)
- func (m *AppleDouble) LoadFXInfo(d *[16]byte)
- func (m *AppleDouble) WithResourceFork(r io.ReaderAt, size int64) (io.ReaderAt, int64)
- func (m *AppleDouble) WithSequentialResourceFork(opener func() (io.ReadCloser, error), size int64) (func() (io.ReadCloser, error), int64)
Constants ¶
View Source
const ( DATA_FORK = 1 RESOURCE_FORK = 2 REAL_NAME = 3 COMMENT = 4 ICON_BW = 5 ICON_COLOR = 6 FILE_INFO_V1 = 7 // Old v1 file info combining FILE_DATES_INFO and MACINTOSH_FILE_INFO. FILE_DATES_INFO = 8 FINDER_INFO = 9 // FinderInfo (16) + FinderXInfo (16) MACINTOSH_FILE_INFO = 10 // 32 bits, bits 31 = protected and 32 = locked PRODOS_FILE_INFO = 11 MSDOS_FILE_INFO = 12 SHORT_NAME = 13 // AFP short name. AFP_FILE_INFO = 14 DIRECTORY_ID = 15 // AFP directory ID. )
View Source
const ( FlagIsOnDesk = 0x0001 // Files and folders (System 6) MaskColor = 0x000E // Files and folders FlagRequireSwitchLaunch = 0x0020 // Applications only FlagHasNoINITs = 0x0080 // Extensions/Control Panels only FlagHasBeenInited = 0x0100 // Files only (all BNDL/FREF/open/kind have been added) FlagAOCELetter = 0x0200 // obsoleted FlagHasCustomIcon = 0x0400 // Files and folders FlagIsStationery = 0x0800 // Files only FlagNameLocked = 0x1000 // Files and folders FlagHasBundle = 0x2000 // Files only FlagIsInvisible = 0x4000 // Files and folders FlagIsAlias = 0x8000 // Files only XFlagHasCustomBadge = 0x0100 XFlagHasRoutingInfo = 0x0004 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppleDouble ¶
type AppleDouble struct {
// Basic filesystem metadata
CreateTime, ModTime, BkTime, AccTime time.Time
Locked bool
// Stored in various ways across software versions, nonetheless important
Comment string
// File-and-directory FinderInfo
Flags uint16
Location struct{ Y, X int16 }
XFlags uint16 // ignore the rarely used "filename display script" function
// File-only FinderInfo
Type [4]byte
Creator [4]byte
// Directory-only FinderInfo
Rect struct{ T, L, B, R int16 }
View int16 // 0 is not a valid value, use 256 (icon view)
Scroll struct{ Y, X int16 }
}
Everything that we would want to put in an AppleDouble file, except for a resource fork, because that's big. Excludes some of the Finder info fields that become meaningless when moving to a different disk
func (*AppleDouble) LoadDInfo ¶
func (m *AppleDouble) LoadDInfo(d *[16]byte)
func (*AppleDouble) LoadDXInfo ¶
func (m *AppleDouble) LoadDXInfo(d *[16]byte)
func (*AppleDouble) LoadFInfo ¶
func (m *AppleDouble) LoadFInfo(d *[16]byte)
func (*AppleDouble) LoadFXInfo ¶
func (m *AppleDouble) LoadFXInfo(d *[16]byte)
func (*AppleDouble) WithResourceFork ¶
func (*AppleDouble) WithSequentialResourceFork ¶
func (m *AppleDouble) WithSequentialResourceFork(opener func() (io.ReadCloser, error), size int64) (func() (io.ReadCloser, error), int64)
Click to show internal directories.
Click to hide internal directories.