pub struct PackedFile {
pub timestamp: Option<u32>,
pub path: String,
// some fields omitted
}
This struct represents a PackedFile, a File contained inside a PackFile.
A PackedFile is a File contained inside a PackFile. It contains:
timestamp
: a timestamp in u32
format of the PackedFile, usually his last modified
date. Optional.
path
: a path of type a/b/c.whatever
. This is the virtual path of the PackedFile.
data
: a Mutex<PackedFileData>
with the data to be contained in the PackedFile. Private. If you want to get/set it, use the dedicated methods.
Keep in mind that other than decrypting the data if it's encrypted, the PackedFiles data is stored as it's in the PackFile.
If you want to decode it/process it/edit it in any way, use an specialized program like RPFM, or write your own code for it.
This function creates a new PackedFile with the provided info.
It requires:
timestamp
: a timestamp in u32
format of the PackedFile, usually his last modified
date. Optional.
path
: a path of type a/b/c.whatever
.
data
: the data to be contained in the PackedFile. For an empty PackedFile, just pass an empty vector.
This function tries to load the data from a PackedFile to memory, if it's not yet loaded. Useful for situations when we just
want to "disable" the Lazy Loading, or for when we need all the stuff loaded in memory for whatever reason.
This function tries to return the raw data contained inside a PackedFile. This can fail only if you're using Lazy-Loading to open the PackFile.
If not, you can safely unwrap the Result.
This function replaces whatever data the PackedFile has with the data provided to it.
Formats the value using the given formatter. Read more
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more