pub struct GgezFileSystem { /* private fields */ }Expand description
A Source using ggez’ paths to read from the filesystem.
See ggez::filesystem for more details.
When hot-reloading is activated, changes to "resources.zip" are ignored.
Implementations§
Source§impl GgezFileSystem
impl GgezFileSystem
Sourcepub fn from_context(fs: &impl Has<Filesystem>) -> Self
pub fn from_context(fs: &impl Has<Filesystem>) -> Self
Creates a new FileSystem from ggez context.
Note that additionnal
Sourcepub fn new(game_id: &str, author: &str) -> Self
👎Deprecated: use GgezFileSystem::from_context instead
pub fn new(game_id: &str, author: &str) -> Self
GgezFileSystem::from_context insteadCreates a new FileSystem.
game_id and author parameters should be the same as thoses given to
ggez::ContextBuilder::new.
Trait Implementations§
Source§impl Clone for GgezFileSystem
impl Clone for GgezFileSystem
Source§fn clone(&self) -> GgezFileSystem
fn clone(&self) -> GgezFileSystem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GgezFileSystem
impl Debug for GgezFileSystem
Source§impl Source for GgezFileSystem
impl Source for GgezFileSystem
Source§fn read(&self, id: &str, ext: &str) -> Result<FileContent<'_>>
fn read(&self, id: &str, ext: &str) -> Result<FileContent<'_>>
Try reading the source given an id and an extension. Read more
Source§fn read_dir(&self, id: &str, f: &mut dyn FnMut(DirEntry<'_>)) -> Result<()>
fn read_dir(&self, id: &str, f: &mut dyn FnMut(DirEntry<'_>)) -> Result<()>
Reads the content of a directory. Read more
Source§fn exists(&self, entry: DirEntry<'_>) -> bool
fn exists(&self, entry: DirEntry<'_>) -> bool
Returns
true if the entry points at an existing entity. Read moreSource§fn configure_hot_reloading(&self, events: EventSender) -> Result<(), BoxedError>
fn configure_hot_reloading(&self, events: EventSender) -> Result<(), BoxedError>
Starts hot-reloading. Read more
Auto Trait Implementations§
impl Freeze for GgezFileSystem
impl RefUnwindSafe for GgezFileSystem
impl Send for GgezFileSystem
impl Sync for GgezFileSystem
impl Unpin for GgezFileSystem
impl UnwindSafe for GgezFileSystem
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> HasMut<T> for T
impl<T> HasMut<T> for T
Source§fn retrieve_mut(&mut self) -> &mut T
fn retrieve_mut(&mut self) -> &mut T
Method to retrieve the context type as mutable.
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more