Athena IO Library
|
Wii file container class. More...
#include <WiiFile.hpp>
Public Types | |
enum | Permission { OtherRead = 0x01, OtherWrite = 0x02, GroupRead = 0x04, GroupWrite = 0x08, OwnerRead = 0x10, OwnerWrite = 0x20, OtherRW = (OtherRead | OtherWrite), GroupRW = (GroupRead | GroupWrite), OwnerRW = (OwnerRead | OwnerWrite) } |
The Wii uses a bastardized unix permissions system so these flags reflect the file's individual permissions. More... | |
enum | Type { File = 0x01, Directory = 0x02 } |
The Type enum. | |
Public Member Functions | |
WiiFile (const std::string &filename) | |
WiiFile. More... | |
WiiFile (const std::string &filename, atUint8 permissions, const atUint8 *data, atUint32 length) | |
WiiFile. More... | |
void | setFilename (const std::string &filename) |
setFilename More... | |
std::string | filename () const |
filename More... | |
void | setData (const atUint8 *data) |
setData More... | |
atUint8 * | data () const |
data More... | |
void | setLength (const int len) |
setLength More... | |
int | length () const |
length More... | |
void | setPermissions (const atUint8 permissions) |
setPermissions More... | |
atUint8 | permissions () const |
permissions More... | |
void | setAttributes (const atUint8 attr) |
setAttributes More... | |
atUint8 | attributes () const |
attributes More... | |
void | setType (Type type) |
setType More... | |
Type | type () const |
type More... | |
bool | isDirectory () const |
isDirectory More... | |
bool | isFile () const |
isFile More... | |
void | addChild (WiiFile *file) |
addChild More... | |
std::vector< WiiFile * > | children () |
children More... | |
WiiFile * | child (const std::string &name) |
child More... | |
void | removeChild (const std::string &name) |
removeChild More... | |
void | removeChild (WiiFile *file) |
removeChild More... | |
WiiFile * | parent () |
parent More... | |
void | setParent (WiiFile *parent) |
setParent More... | |
atUint32 | fileCount () |
fileCount More... | |
std::vector< WiiFile * > | allChildren () |
allChildren More... | |
std::string | fullpath () |
fullpath More... | |
Wii file container class.
Contains all relevant data for a file in a data.bin file.
Definition at line 20 of file WiiFile.hpp.
The Wii uses a bastardized unix permissions system so these flags reflect the file's individual permissions.
Enumerator | |
---|---|
OtherRW |
Mask to get the Other group permissions. |
Definition at line 28 of file WiiFile.hpp.
athena::WiiFile::WiiFile | ( | const std::string & | filename | ) |
filename |
athena::WiiFile::WiiFile | ( | const std::string & | filename, |
atUint8 | permissions, | ||
const atUint8 * | data, | ||
atUint32 | length | ||
) |
filename | |
permissions | |
data | |
length |
void athena::WiiFile::addChild | ( | WiiFile * | file | ) |
addChild
file |
std::vector<WiiFile*> athena::WiiFile::allChildren | ( | ) |
allChildren
atUint8 athena::WiiFile::attributes | ( | ) | const |
attributes
WiiFile* athena::WiiFile::child | ( | const std::string & | name | ) |
child
name |
std::vector<WiiFile*> athena::WiiFile::children | ( | ) |
children
atUint8* athena::WiiFile::data | ( | ) | const |
data
atUint32 athena::WiiFile::fileCount | ( | ) |
fileCount
std::string athena::WiiFile::filename | ( | ) | const |
filename
std::string athena::WiiFile::fullpath | ( | ) |
fullpath
bool athena::WiiFile::isDirectory | ( | ) | const |
isDirectory
bool athena::WiiFile::isFile | ( | ) | const |
isFile
int athena::WiiFile::length | ( | ) | const |
length
WiiFile* athena::WiiFile::parent | ( | ) |
parent
atUint8 athena::WiiFile::permissions | ( | ) | const |
permissions
void athena::WiiFile::removeChild | ( | const std::string & | name | ) |
removeChild
name |
void athena::WiiFile::removeChild | ( | WiiFile * | file | ) |
removeChild
file |
void athena::WiiFile::setAttributes | ( | const atUint8 | attr | ) |
setAttributes
attr |
void athena::WiiFile::setData | ( | const atUint8 * | data | ) |
setData
data |
void athena::WiiFile::setFilename | ( | const std::string & | filename | ) |
setFilename
filename |
void athena::WiiFile::setLength | ( | const int | len | ) |
setLength
len |
void athena::WiiFile::setParent | ( | WiiFile * | parent | ) |
setParent
parent |
void athena::WiiFile::setPermissions | ( | const atUint8 | permissions | ) |
setPermissions
permissions |
void athena::WiiFile::setType | ( | Type | type | ) |
setType
type |
Type athena::WiiFile::type | ( | ) | const |
type