Struct bip_metainfo::FileAccessor
[−]
[src]
pub struct FileAccessor { /* fields omitted */ }
Accessor that pulls data in from the file system.
Methods
impl FileAccessor
[src]
fn new<T>(path: T) -> Result<FileAccessor> where
T: AsRef<Path>,
[src]
T: AsRef<Path>,
Create a new FileAccessor from the given file/directory path.
Trait Implementations
impl IntoAccessor for FileAccessor
[src]
type Accessor = FileAccessor
Concrete Accessor type that will be converted into.
fn into_accessor(self) -> Result<FileAccessor>
[src]
Convert the type into some Accessor as a Result.
impl Accessor for FileAccessor
[src]
fn access_directory(&self) -> Option<&Path>
[src]
Access the directory that all files should be relative to.
fn access_metadata<C>(&self, callback: C) -> Result<()> where
C: FnMut(u64, &Path),
[src]
C: FnMut(u64, &Path),
Access the metadata for all files including their length and path.
fn access_pieces<C>(&self, callback: C) -> Result<()> where
C: for<'a> FnMut(PieceAccess<'a>) -> Result<()>,
[src]
C: for<'a> FnMut(PieceAccess<'a>) -> Result<()>,
Access the sequential pieces that make up all of the files.