[−][src]Enum matryoshka::DataSource
Variants
Dir(DataSource)
Zip(DataSource)
Implementations
impl DataSource
[src]
pub fn open<P: AsRef<Path>>(
&self,
path: P,
opts: OpenOptions
) -> Result<ResFile>
[src]
&self,
path: P,
opts: OpenOptions
) -> Result<ResFile>
Opens a file at path
inside of this DataSource
.
pub fn create_dir<P: AsRef<Path>>(&self, path: P) -> Result<()>
[src]
Creates a directory at path
inside of this DataSource
.
pub fn create_dir_all<P: AsRef<Path>>(&self, path: P) -> Result<()>
[src]
Creates a directory including all its parent directories at path
inside of this DataSource
.
pub fn delete_file<P: AsRef<Path>>(&self, path: P) -> Result<()>
[src]
Deletes the file specified by path
inside of this DataSource
.
pub fn delete_dir<P: AsRef<Path>>(&self, path: P) -> Result<()>
[src]
Deletes the directory specified by path
inside of this DataSource
.
This will fail if the directory is not empty.
pub fn delete_dir_all<P: AsRef<Path>>(&self, path: P) -> Result<()>
[src]
Deletes the directory specified by path
inside of this DataSource
,
including all files and directories contained within, recursively.
pub fn list_dir<P: AsRef<Path>>(&self, path: P) -> Result<Vec<DirEntry>>
[src]
Returns a list of contents of the directory specified by path
.
pub fn read_info<P: AsRef<Path>>(&self, path: P) -> Result<FileInfo>
[src]
Returns information about the file or directory specified by path
.
pub fn is_file<P: AsRef<Path>>(&self, path: P) -> bool
[src]
Returns whether path
points to a file.
pub fn is_dir<P: AsRef<Path>>(&self, path: P) -> bool
[src]
Returns whether path
points to a directory.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for DataSource
impl Send for DataSource
impl !Sync for DataSource
impl Unpin for DataSource
impl UnwindSafe for DataSource
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,