private VFSHandle(string filename, VFSHandle parent, long offset, long size) { this.parent = parent; this.mmf = null; this.offset = offset; this.size = size; this.filename = filename; }
public bool AddMix(string filename, MixFileVersion mixver) { VFSHandle handle = this.Resolve(filename); if (handle != null) { this.folders.Add(new MixArchive(handle, mixver)); return(true); } return(false); }
public VFSHandle Resolve(string filename) { foreach (VFSFolder folder in this.folders) { VFSHandle handle = folder.Resolve(filename); if (handle != null) { return(handle); } } return(null); }
public VFSHandle(string filename) { FileInfo fi = new FileInfo(filename); this.parent = null; this.mmf = MemoryMappedFile.CreateFromFile( File.Open(fi.FullName, FileMode.Open, FileAccess.Read, FileShare.Read), null, 0, MemoryMappedFileAccess.Read, HandleInheritability.None, false ); this.offset = 0; this.size = fi.Length; this.filename = filename; }