pub struct Dir<'a> { /* private fields */ }Expand description
A directory entry.
Implementations§
Source§impl<'a> Dir<'a>
impl<'a> Dir<'a>
Sourcepub fn get_dir<S: AsRef<Path>>(&self, path: S) -> Option<Dir<'a>>
pub fn get_dir<S: AsRef<Path>>(&self, path: S) -> Option<Dir<'a>>
Fetch a sub-directory by exactly matching its path relative to the
directory included with include_dir!().
Sourcepub fn get_file<S: AsRef<Path>>(&self, path: S) -> Option<File<'a>>
pub fn get_file<S: AsRef<Path>>(&self, path: S) -> Option<File<'a>>
Fetch a sub-directory by exactly matching its path relative to the
directory included with include_dir!().
Sourcepub fn extract<S: AsRef<Path>>(&self, path: S) -> Result<()>
pub fn extract<S: AsRef<Path>>(&self, path: S) -> Result<()>
Create directories and extract all files to real filesystem.
Creates parent directories of path if they do not already exist.
Fails if some files already exist.
In case of error, partially extracted directory may remain on the filesystem.
Sourcepub fn created(&self) -> Option<SystemTime>
pub fn created(&self) -> Option<SystemTime>
The directory’s created timestamp as of compilation time, if available
Sourcepub fn modified(&self) -> Option<SystemTime>
pub fn modified(&self) -> Option<SystemTime>
The directory’s last modified timestamp as of compilation time, if available
Sourcepub fn accessed(&self) -> Option<SystemTime>
pub fn accessed(&self) -> Option<SystemTime>
The directory’s last accessed timestamp as of compilation time, if available
Trait Implementations§
impl<'a> Copy for Dir<'a>
impl<'a> StructuralPartialEq for Dir<'a>
Auto Trait Implementations§
impl<'a> Freeze for Dir<'a>
impl<'a> RefUnwindSafe for Dir<'a>
impl<'a> Send for Dir<'a>
impl<'a> Sync for Dir<'a>
impl<'a> Unpin for Dir<'a>
impl<'a> UnwindSafe for Dir<'a>
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