Documentation
¶
Index ¶
- Constants
- Variables
- type ARC
- func (a *ARC) FileSize(path string) (int, error)
- func (a *ARC) OpenDir(path string) (*ARCDir, error)
- func (a *ARC) OpenFile(path string) (*ARCFile, error)
- func (a *ARC) ReadFile(path string) ([]byte, error)
- func (a *ARC) Save() ([]byte, error)
- func (a *ARC) SaveToFile(path string) error
- func (a *ARC) WriteFile(path string, contents []byte) error
- type ARCDir
- func (d *ARCDir) AddDir(dir ARCDir)
- func (d *ARCDir) AddFile(file ARCFile)
- func (d *ARCDir) GetDir(name string) (*ARCDir, error)
- func (d *ARCDir) GetFile(name string) (*ARCFile, error)
- func (d *ARCDir) RecursiveCount() int
- func (d *ARCDir) Size() int
- func (d *ARCDir) WriteFile(name string, contents []byte)
- type ARCFile
- type ARCType
Constants ¶
View Source
const (
ARCHeader = 0x55AA382D
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ARC ¶
type ARC struct { // RootRecord holds the root record for this ARC. // // It's important to note that this root record is nameless. // Many officially-provided ARCs within Nintendo games have one folder // containing all data, typically named "arc". // This folder has "arc" as one of its contents. RootRecord ARCDir }
ARC describes a hierarchy suitable for serialization and deserialization of an ARC file.
func LoadFromFile ¶
LoadFromFile reads a file and passes its contents to Load.
func (*ARC) SaveToFile ¶
SaveToFile writes a serialized ARC to the specified path.
type ARCDir ¶
type ARCDir struct { // Filename is the name of this directory. It must not be empty. Filename string // Files is an array of files within this directory. Files []ARCFile // Subdirs is an array of directories within this directory. Subdirs []ARCDir // contains filtered or unexported fields }
ARCDir represents a directory available within an ARC.
func (*ARCDir) RecursiveCount ¶
RecursiveCount returns the amount of files and sub-directories within.
Click to show internal directories.
Click to hide internal directories.