public override Stream OpenFileRaw(string path, FileMode mode = FileMode.Open) { if (mode != FileMode.Open) { throw new NotSupportedException(); } var stream = new AssetStream(this, path); if (CommandLineArgs.SimulateSlowExternalStorage) { ExternalStorageLagsSimulator.SimulateReadDelay(path, stream.descriptor.Length); } return(stream); }
public override Stream OpenFile(string path) { var stream = new AssetStream(this, path); var desc = stream.descriptor; if (CommandLineArgs.SimulateSlowExternalStorage) { ExternalStorageLagsSimulator.SimulateReadDelay(path, desc.Length); } if ((desc.Attributes & AssetAttributes.Zipped) != 0) { return(DecompressAssetStream(stream, desc.Attributes)); } return(stream); }