pub struct CascFileSystem { /* private fields */ }Expand description
java_package=whiteout.utils — abstract file system that resolves files by numeric data ID (e.g. CASC).
Implementations§
Source§impl CascFileSystem
impl CascFileSystem
Sourcepub fn read_file(&self, file_id: u32) -> Bytes
pub fn read_file(&self, file_id: u32) -> Bytes
Read the entire contents of a file by its numeric data ID.
Sourcepub fn reserve_file_id(&mut self, path: &str) -> Option<u32>
pub fn reserve_file_id(&mut self, path: &str) -> Option<u32>
Resolve a path to a numeric file ID (nullable).
Sourcepub fn write_file(&mut self, file_id: u32, data: &[u8]) -> bool
pub fn write_file(&mut self, file_id: u32, data: &[u8]) -> bool
Write a file by its numeric data ID. Returns true on success.
Sourcepub fn file_exists(&self, file_id: u32) -> bool
pub fn file_exists(&self, file_id: u32) -> bool
Check if a file with the given data ID exists.
Trait Implementations§
Source§impl Debug for CascFileSystem
impl Debug for CascFileSystem
Source§impl Drop for CascFileSystem
impl Drop for CascFileSystem
impl Send for CascFileSystem
Auto Trait Implementations§
impl !Sync for CascFileSystem
impl Freeze for CascFileSystem
impl RefUnwindSafe for CascFileSystem
impl Unpin for CascFileSystem
impl UnsafeUnpin for CascFileSystem
impl UnwindSafe for CascFileSystem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more