pub enum File {
Serialized(Arc<SerializedFile>),
Bundle(Arc<BundleFile>),
Web(Arc<WebFile>),
Raw(Arc<RawFile>),
}Expand description
A parsed file.
Variants§
Serialized(Arc<SerializedFile>)
An AssetsFile that is not raw by the name rule.
Bundle(Arc<BundleFile>)
A bundle.
Web(Arc<WebFile>)
A WebFile.
Raw(Arc<RawFile>)
What UnityPy keeps as a reader: resources, name-rule files, zip entries.
Implementations§
Source§impl File
impl File
Sourcepub fn mark_changed(&self)
pub fn mark_changed(&self)
Mark a parsed file and its parents changed. Raw readers have no flag.
Sourcepub fn is_changed(&self) -> bool
pub fn is_changed(&self) -> bool
Whether this parsed file was marked changed.
Source§impl File
impl File
Sourcepub fn container_files(&self) -> &[FileSlot]
pub fn container_files(&self) -> &[FileSlot]
A container’s loaded ordered files dict, or an empty slice for a leaf.
New resource writers are exposed by the container’s writeable_cabs.
Sourcepub fn container_directory(&self) -> &[DirEntry]
pub fn container_directory(&self) -> &[DirEntry]
All container rows in original order, including duplicate names.
Sourcepub fn container_entry(&self, i: usize) -> Result<File, Error>
pub fn container_entry(&self, i: usize) -> Result<File, Error>
Parse a container row. Leaf files have no rows.
Sourcepub fn child_container(&self, i: usize) -> Result<Option<Self>, Error>
pub fn child_container(&self, i: usize) -> Result<Option<Self>, Error>
Open a child container, leaving serialized and raw entries lazy. A leaf still occupies its directory position in a file walk. Probe read failures and resource refusals are returned.
Sourcepub fn file_type(&self) -> FileType
pub fn file_type(&self) -> FileType
What check_file_type called the bytes parse_file built this
from, kept so a caller never detects them again (a gzip entry’s
detection inflates it): each kind but a reader has one type, and a
reader keeps its own (RawFile::file_type).