ArchiveEntry
The ArchiveEntry type represents an entry in SLADE.
Properties
Property | Type | Description |
---|---|---|
The entry name. As an example, for an entry Actors/Weapons/Gun1.txt this will be Gun1.txt |
||
The path to the entry in the archive, beginning and ending with / .As an example, for an entry Actors/Weapons/Gun1.txt , this will be /Actors/Weapons/ . If the entry isn't in a directory this will be just / |
||
The entry's type information | ||
The size of the entry in bytes | ||
The entry's data | ||
The 32-bit crc value calculated from the entry's data |
Constructors
No Constructors
This type can not be created directly in scripts.
Functions
formattedName
[
boolean include_path :true]
: Whether to include the entry path[
boolean include_extension :true]
: Whether to include the entry extension[
boolean upper_case :false]
: Whether to convert the entry name to uppercase
Returns
Returns a formatted name of the entry, depending on the parameters given. Note that
formattedSize
Returns
Returns the size of the entry in a formatted string, eg. 1.3kb
importFile
string path : The full path to the file to import
Returns
Imports the file at the given true
if the import succeeded.
If the import fails, the error that occurred should be available via slade.globalError()
.
importEntry
ArchiveEntry entry : The entry to import data from
Returns
Imports (copies) the data from true
if the import succeeded.
If the import fails, the error that occurred should be available via slade.globalError()
.
importData
string data : The data to import
Returns
Imports true
if the import succeeded.
If the import fails, the error that occurred should be available via slade.globalError()
.
exportFile
string path : The full path to the file to export
Returns
Exports the entry data to a file at true
if the export succeeded.
If the export fails, the error that occurred should be available via slade.globalError()
.