DirLike

Trait DirLike 

Source
pub trait DirLike {
    // Required methods
    fn file_size(&mut self, path: &str) -> Result<u64>;
    fn open(&mut self, path: &str) -> Result<Box<dyn Read>>;
}
Expand description

Virtual directory trait

Local file system or archive file (Zip, Tar …)

Required Methods§

Source

fn file_size(&mut self, path: &str) -> Result<u64>

指定したパスのファイルサイズを取得

Source

fn open(&mut self, path: &str) -> Result<Box<dyn Read>>

指定したパスのファイルを開く

Implementations on Foreign Types§

Source§

impl DirLike for &Path

DirLike implement for Local file system

Source§

fn file_size(&mut self, path: &str) -> Result<u64>

Source§

fn open(&mut self, path: &str) -> Result<Box<dyn Read>>

Implementors§

Source§

impl<R: Read + Seek> DirLike for ZipDir<R>

Available on crate feature zip only.