pub struct FileSystem { /* private fields */ }Implementations§
Source§impl FileSystem
impl FileSystem
pub fn new() -> Self
pub fn get_base_path(&self) -> PathBuf
Sourcepub fn add_file(
&mut self,
disk_path: PathBuf,
virtual_path: &PathBuf,
virtual_is_file: bool,
as_bytes: bool,
) -> Option<usize>
pub fn add_file( &mut self, disk_path: PathBuf, virtual_path: &PathBuf, virtual_is_file: bool, as_bytes: bool, ) -> Option<usize>
Create a file in the filesystem.
If the file already exists, this function will return None.
disk_path- Path to file on the hosts system.virtual_path- Internal path representation.virtual_is_file- If [virtual_path] contains a filename.as_bytes- Should the file be loaded into a byte array?
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileSystem
impl RefUnwindSafe for FileSystem
impl Send for FileSystem
impl Sync for FileSystem
impl Unpin for FileSystem
impl UnwindSafe for FileSystem
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