2023-12-04 14:17:13 +01:00
|
|
|
using System.IO;
|
2018-08-16 20:47:36 -03:00
|
|
|
|
|
|
|
|
namespace Ryujinx.HLE.Loaders.Npdm
|
|
|
|
|
{
|
2019-11-29 04:32:51 +00:00
|
|
|
public class FsAccessControl
|
2018-08-16 20:47:36 -03:00
|
|
|
{
|
2023-07-16 19:31:14 +02:00
|
|
|
public int Version { get; private set; }
|
2018-12-04 22:52:39 -02:00
|
|
|
public ulong PermissionsBitmask { get; private set; }
|
2023-07-16 19:31:14 +02:00
|
|
|
public int Unknown1 { get; private set; }
|
|
|
|
|
public int Unknown2 { get; private set; }
|
|
|
|
|
public int Unknown3 { get; private set; }
|
|
|
|
|
public int Unknown4 { get; private set; }
|
2018-08-16 20:47:36 -03:00
|
|
|
|
2024-07-20 21:35:43 +02:00
|
|
|
/// <exception cref="System.ArgumentException">The stream does not support reading, is <see langword="null"/>, or is already closed.</exception>
|
|
|
|
|
/// <exception cref="EndOfStreamException">The end of the stream is reached.</exception>
|
|
|
|
|
/// <exception cref="System.ObjectDisposedException">The stream is closed.</exception>
|
|
|
|
|
/// <exception cref="IOException">An I/O error occurred.</exception>
|
2018-12-06 05:16:24 -06:00
|
|
|
public FsAccessControl(Stream stream, int offset, int size)
|
2018-08-16 20:47:36 -03:00
|
|
|
{
|
2018-12-06 05:16:24 -06:00
|
|
|
stream.Seek(offset, SeekOrigin.Begin);
|
2018-08-16 20:47:36 -03:00
|
|
|
|
2023-07-16 19:31:14 +02:00
|
|
|
BinaryReader reader = new(stream);
|
2018-08-16 20:47:36 -03:00
|
|
|
|
2023-07-16 19:31:14 +02:00
|
|
|
Version = reader.ReadInt32();
|
2018-12-06 05:16:24 -06:00
|
|
|
PermissionsBitmask = reader.ReadUInt64();
|
2023-07-16 19:31:14 +02:00
|
|
|
Unknown1 = reader.ReadInt32();
|
|
|
|
|
Unknown2 = reader.ReadInt32();
|
|
|
|
|
Unknown3 = reader.ReadInt32();
|
|
|
|
|
Unknown4 = reader.ReadInt32();
|
2018-08-16 20:47:36 -03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|