pub struct PathLike<'a, R: Read + Seek> { /* private fields */ }Expand description
A representation of a path within the archive.
Caution: do not attempt to push directory components manually but use
PathLike::push() instead. The reason is that on Windows, backslash would
be used to separate directories, but in a zip file, slashes are always used.
Implementations§
Source§impl<'a, R: Read + Seek> PathLike<'a, R>
impl<'a, R: Read + Seek> PathLike<'a, R>
pub fn push<P: AsRef<Path>>(&mut self, p: P)
pub fn join<P: AsRef<Path>>(self, p: P) -> Self
pub fn path(&mut self) -> &Path
pub fn replace(&mut self, relname: PathBuf) -> PathBuf
pub fn extension(&mut self) -> Option<&OsStr>
pub fn set_extension(&mut self, e: &str) -> bool
pub fn display(&self) -> Display<'_>
pub fn exists(&mut self) -> bool
pub fn open(self) -> Result<FileReader<'a>>
pub fn is_file(&mut self) -> bool
Sourcepub fn list_paths(&self) -> Result<Vec<PathBuf>>
pub fn list_paths(&self) -> Result<Vec<PathBuf>>
Lists, non-recursively, the paths in this directory.
Trait Implementations§
Auto Trait Implementations§
impl<'a, R> Freeze for PathLike<'a, R>
impl<'a, R> RefUnwindSafe for PathLike<'a, R>where
R: RefUnwindSafe,
impl<'a, R> Send for PathLike<'a, R>where
R: Send,
impl<'a, R> Sync for PathLike<'a, R>where
R: Sync,
impl<'a, R> Unpin for PathLike<'a, R>
impl<'a, R> UnsafeUnpin for PathLike<'a, R>
impl<'a, R> !UnwindSafe for PathLike<'a, R>
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