FsAccessControl.cs
1 using System.IO; 2 3 namespace Ryujinx.HLE.Loaders.Npdm 4 { 5 public class FsAccessControl 6 { 7 public int Version { get; private set; } 8 public ulong PermissionsBitmask { get; private set; } 9 public int Unknown1 { get; private set; } 10 public int Unknown2 { get; private set; } 11 public int Unknown3 { get; private set; } 12 public int Unknown4 { get; private set; } 13 14 /// <exception cref="System.ArgumentException">The stream does not support reading, is <see langword="null"/>, or is already closed.</exception> 15 /// <exception cref="EndOfStreamException">The end of the stream is reached.</exception> 16 /// <exception cref="System.ObjectDisposedException">The stream is closed.</exception> 17 /// <exception cref="IOException">An I/O error occurred.</exception> 18 public FsAccessControl(Stream stream, int offset, int size) 19 { 20 stream.Seek(offset, SeekOrigin.Begin); 21 22 BinaryReader reader = new(stream); 23 24 Version = reader.ReadInt32(); 25 PermissionsBitmask = reader.ReadUInt64(); 26 Unknown1 = reader.ReadInt32(); 27 Unknown2 = reader.ReadInt32(); 28 Unknown3 = reader.ReadInt32(); 29 Unknown4 = reader.ReadInt32(); 30 } 31 } 32 }