pub fn open<P: AsRef<Path>>(path: P) -> Result<DotBC> {
        let file = try!(File::open(path));
        let mut zip = try!(ZipArchive::new(file));
        let mut dotbc = DotBC::new();

        for i in 0..zip.len() {
            let file = try!(zip.by_index(i));
            let name = file.name().into();
            let data = try!(file.bytes().collect());

            dotbc.files.insert(name, data);
        }

        Ok(dotbc)
    }
/// Open the .bc archive located at the given path
Open the .bc archive located at the given path
Open the . bc archive located at the given path
pub fn open<P: AsRef<Path>>(path: P) -> Result<DotBC> {
        let file = try!(File::open(path));
        let mut zip = try!(ZipArchive::new(file));
        let mut dotbc = DotBC::new();
        for i in 0..zip.len() {
            let file = try!(zip.by_index(i));
            let name = file.name().into();
            let data = try!(file.bytes().collect());
            dotbc.files.insert(name, data);
        }
        Ok(dotbc)
    }
pub fn open < P : AsRef < Path > > ( path : P ) -> Result < DotBC > { let file = try ! ( File open ( path ) ) ; let mut zip = try ! ( ZipArchive new ( file ) ) ; let mut dotbc = DotBC :: new ( ) ; for i in 0 .. zip . len ( ) { let file = try ! ( zip by_index ( i ) ) ; let name = file . name ( ) . into ( ) ; let data = try ! ( file bytes ( ) collect ( ) ) ; dotbc . files . insert ( name , data ) ; } Ok ( dotbc ) }
Open the .bc archive located at the given path
Open the . bc archive located at the given path
path
P
path
P