pub fn new<P: AsRef<Path>>(base_path: P) -> FileSystem {
        let mut base = PathBuf::new();
        base.push(base_path);

        let mpq_path = base.join(MPQ_FOLDER);

        let mut dc6meta_path = base.clone();
        dc6meta_path.push("d2data/dc6_meta.yml");

        // Load dc6_meta.yml
        let d2meta = D2FileMetaInfo::load(MmapedFile::new_entire(dc6meta_path).unwrap());

        Self {
            base,
            caches: None,
            mpqs: MPQFilesystem::new(mpq_path).unwrap(),
            d2meta,
        }
    }
/// Initialize a new game filesystem.
Initialize a new game filesystem.
Initialize a new game filesystem .
pub fn new<P: AsRef<Path>>(base_path: P) -> FileSystem {
        let mut base = PathBuf::new();
        base.push(base_path);
        let mpq_path = base.join(MPQ_FOLDER);
        let mut dc6meta_path = base.clone();
        dc6meta_path.push("d2data/dc6_meta.yml");
        // Load dc6_meta.yml
        let d2meta = D2FileMetaInfo::load(MmapedFile::new_entire(dc6meta_path).unwrap());
        Self {
            base,
            caches: None,
            mpqs: MPQFilesystem::new(mpq_path).unwrap(),
            d2meta,
        }
    }
pub fn new < P : AsRef < Path > > ( base_path : P ) -> FileSystem { let mut base = PathBuf :: new ( ) ; base . push ( base_path ) ; let mpq_path = base . join ( MPQ_FOLDER ) ; let mut dc6meta_path = base . clone ( ) ; dc6meta_path . push ( " " ) ; // Load dc6_meta.yml let d2meta = D2FileMetaInfo :: load ( MmapedFile :: new_entire ( dc6meta_path ) . unwrap ( ) ) ; Self { base , caches : None , mpqs : MPQFilesystem :: new ( mpq_path ) . unwrap ( ) , d2meta , } }
Initialize a new game filesystem.
Initialize a new game filesystem .
base_path
P
base_path
P