pub struct ZipReadOnly<IO: Read + Seek + Send + 'static> { /* private fields */ }
Expand description
A read-only zip archive filesystem
Implementations§
Source§impl<IO: Read + Seek + Send> ZipReadOnly<IO>
impl<IO: Read + Seek + Send> ZipReadOnly<IO>
Sourcepub fn new_strict(io: IO) -> Result<Self>
pub fn new_strict(io: IO) -> Result<Self>
Create a new read-only zip filesystem. Any archive errors (including unsupported paths) will result in errors.
Sourcepub fn new_relaxed(io: IO) -> Result<Self>
pub fn new_relaxed(io: IO) -> Result<Self>
Create a new read-only zip filesystem. Some archive errors (such as unsupported paths) will be ignored.
Trait Implementations§
Source§impl<IO: Read + Seek + Send + 'static> FileSystem for ZipReadOnly<IO>
impl<IO: Read + Seek + Send + 'static> FileSystem for ZipReadOnly<IO>
Source§fn read_dir(&self, orig: &str) -> VfsResult<Box<dyn Iterator<Item = String>>>
fn read_dir(&self, orig: &str) -> VfsResult<Box<dyn Iterator<Item = String>>>
Iterates over all entries of this directory path
Source§fn open_file(&self, orig: &str) -> VfsResult<Box<dyn SeekAndRead>>
fn open_file(&self, orig: &str) -> VfsResult<Box<dyn SeekAndRead>>
Opens the file at this path for reading
Source§fn metadata(&self, orig: &str) -> VfsResult<VfsMetadata>
fn metadata(&self, orig: &str) -> VfsResult<VfsMetadata>
Returns the file metadata for the file at this path
Source§fn exists(&self, path: &str) -> bool
fn exists(&self, path: &str) -> bool
Returns true if a file or directory at path exists, false otherwise
Source§fn create_dir(&self, _path: &str) -> VfsResult<()>
fn create_dir(&self, _path: &str) -> VfsResult<()>
Creates the directory at this path Read more
Source§fn create_file(&self, _path: &str) -> VfsResult<Box<dyn Write>>
fn create_file(&self, _path: &str) -> VfsResult<Box<dyn Write>>
Creates a file at this path for writing
Source§fn append_file(&self, _path: &str) -> VfsResult<Box<dyn Write>>
fn append_file(&self, _path: &str) -> VfsResult<Box<dyn Write>>
Opens the file at this path for appending
Source§fn copy_file(&self, _src: &str, _dst: &str) -> VfsResult<()>
fn copy_file(&self, _src: &str, _dst: &str) -> VfsResult<()>
Copies the src path to the destination path within the same filesystem (optional)
Auto Trait Implementations§
impl<IO> !Freeze for ZipReadOnly<IO>
impl<IO> RefUnwindSafe for ZipReadOnly<IO>
impl<IO> Send for ZipReadOnly<IO>
impl<IO> Sync for ZipReadOnly<IO>
impl<IO> Unpin for ZipReadOnly<IO>where
IO: Unpin,
impl<IO> UnwindSafe for ZipReadOnly<IO>
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