// Methods public XFSInputFile(XboxISOFileSource xbdvd, int SizeOfRoot, int StartBlock) { this.SourceISO = xbdvd; this.attributes = 0x10; this.filename = "XDFS Root"; this.filelength = SizeOfRoot; this.StartSector = StartBlock; }
public XFSInputFile(XboxISOFileSource xbdvd, byte[] buffer, int fsOffset) { this.SourceISO = xbdvd; this.StartSector = BitConverter.ToInt32(buffer, fsOffset + 4); this.filelength = BitConverter.ToUInt32(buffer, fsOffset + 8); byte count = buffer[fsOffset + 13]; this.filename = Encoding.ASCII.GetString(buffer, fsOffset + 14, count); this.attributes = buffer[fsOffset + 12]; }
public static XboxISOFileSource TryOpen(Stream inStream) { string fname = "azusa_dummy.iso"; if (inStream is FileStream fileStream) { inStream.Position = 0; fname = Path.GetFileName(fileStream.Name); } try { XboxISOFileSource result = new XboxISOFileSource(inStream, fname, inStream.Length); return(result); } catch (Exception) { inStream.Position = 0; return(null); } }