Rename VFs to FileSystem

This commit is contained in:
gdkchan 2018-08-16 12:38:10 -03:00
commit a2e44a01eb
6 changed files with 26 additions and 26 deletions

View file

@ -34,7 +34,7 @@ namespace Ryujinx.HLE.HOS.Font
Memory = Device.Memory; Memory = Device.Memory;
FontsPath = Path.Combine(Device.VFs.GetSystemPath(), "fonts"); FontsPath = Path.Combine(Device.FileSystem.GetSystemPath(), "fonts");
} }
public void EnsureInitialized() public void EnsureInitialized()

View file

@ -58,7 +58,7 @@ namespace Ryujinx.HLE.HOS
{ {
if (RomFsFile != null) if (RomFsFile != null)
{ {
Device.VFs.LoadRomFs(RomFsFile); Device.FileSystem.LoadRomFs(RomFsFile);
} }
string NpdmFileName = Path.Combine(ExeFsDir, "main.npdm"); string NpdmFileName = Path.Combine(ExeFsDir, "main.npdm");
@ -124,12 +124,12 @@ namespace Ryujinx.HLE.HOS
bool IsNro = Path.GetExtension(FilePath).ToLower() == ".nro"; bool IsNro = Path.GetExtension(FilePath).ToLower() == ".nro";
string Name = Path.GetFileNameWithoutExtension(FilePath); string Name = Path.GetFileNameWithoutExtension(FilePath);
string SwitchFilePath = Device.VFs.SystemPathToSwitchPath(FilePath); string SwitchFilePath = Device.FileSystem.SystemPathToSwitchPath(FilePath);
if (IsNro && (SwitchFilePath == null || !SwitchFilePath.StartsWith("sdmc:/"))) if (IsNro && (SwitchFilePath == null || !SwitchFilePath.StartsWith("sdmc:/")))
{ {
string SwitchPath = $"sdmc:/switch/{Name}{Homebrew.TemporaryNroSuffix}"; string SwitchPath = $"sdmc:/switch/{Name}{Homebrew.TemporaryNroSuffix}";
string TempPath = Device.VFs.SwitchPathToSystemPath(SwitchPath); string TempPath = Device.FileSystem.SwitchPathToSystemPath(SwitchPath);
string SwitchDir = Path.GetDirectoryName(TempPath); string SwitchDir = Path.GetDirectoryName(TempPath);

View file

@ -167,7 +167,7 @@ namespace Ryujinx.HLE.HOS
MemoryState.MappedMemory, MemoryState.MappedMemory,
MemoryPermission.ReadAndWrite); MemoryPermission.ReadAndWrite);
string SwitchPath = Device.VFs.SystemPathToSwitchPath(Executables[0].FilePath); string SwitchPath = Device.FileSystem.SystemPathToSwitchPath(Executables[0].FilePath);
Homebrew.WriteHbAbiData(Memory, HbAbiDataPosition, Handle, SwitchPath); Homebrew.WriteHbAbiData(Memory, HbAbiDataPosition, Handle, SwitchPath);

View file

@ -51,7 +51,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
long Mode = Context.RequestData.ReadInt64(); long Mode = Context.RequestData.ReadInt64();
int Size = Context.RequestData.ReadInt32(); int Size = Context.RequestData.ReadInt32();
string FileName = Context.Device.VFs.GetFullPath(Path, Name); string FileName = Context.Device.FileSystem.GetFullPath(Path, Name);
if (FileName == null) if (FileName == null)
{ {
@ -80,7 +80,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
{ {
string Name = ReadUtf8String(Context); string Name = ReadUtf8String(Context);
string FileName = Context.Device.VFs.GetFullPath(Path, Name); string FileName = Context.Device.FileSystem.GetFullPath(Path, Name);
if (!File.Exists(FileName)) if (!File.Exists(FileName))
{ {
@ -101,7 +101,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
{ {
string Name = ReadUtf8String(Context); string Name = ReadUtf8String(Context);
string DirName = Context.Device.VFs.GetFullPath(Path, Name); string DirName = Context.Device.FileSystem.GetFullPath(Path, Name);
if (DirName == null) if (DirName == null)
{ {
@ -137,7 +137,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
{ {
string Name = ReadUtf8String(Context); string Name = ReadUtf8String(Context);
string DirName = Context.Device.VFs.GetFullPath(Path, Name); string DirName = Context.Device.FileSystem.GetFullPath(Path, Name);
if (!Directory.Exists(DirName)) if (!Directory.Exists(DirName))
{ {
@ -159,8 +159,8 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
string OldName = ReadUtf8String(Context, 0); string OldName = ReadUtf8String(Context, 0);
string NewName = ReadUtf8String(Context, 1); string NewName = ReadUtf8String(Context, 1);
string OldFileName = Context.Device.VFs.GetFullPath(Path, OldName); string OldFileName = Context.Device.FileSystem.GetFullPath(Path, OldName);
string NewFileName = Context.Device.VFs.GetFullPath(Path, NewName); string NewFileName = Context.Device.FileSystem.GetFullPath(Path, NewName);
if (!File.Exists(OldFileName)) if (!File.Exists(OldFileName))
{ {
@ -187,8 +187,8 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
string OldName = ReadUtf8String(Context, 0); string OldName = ReadUtf8String(Context, 0);
string NewName = ReadUtf8String(Context, 1); string NewName = ReadUtf8String(Context, 1);
string OldDirName = Context.Device.VFs.GetFullPath(Path, OldName); string OldDirName = Context.Device.FileSystem.GetFullPath(Path, OldName);
string NewDirName = Context.Device.VFs.GetFullPath(Path, NewName); string NewDirName = Context.Device.FileSystem.GetFullPath(Path, NewName);
if (!Directory.Exists(OldDirName)) if (!Directory.Exists(OldDirName))
{ {
@ -214,7 +214,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
{ {
string Name = ReadUtf8String(Context); string Name = ReadUtf8String(Context);
string FileName = Context.Device.VFs.GetFullPath(Path, Name); string FileName = Context.Device.FileSystem.GetFullPath(Path, Name);
if (File.Exists(FileName)) if (File.Exists(FileName))
{ {
@ -240,7 +240,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
string Name = ReadUtf8String(Context); string Name = ReadUtf8String(Context);
string FileName = Context.Device.VFs.GetFullPath(Path, Name); string FileName = Context.Device.FileSystem.GetFullPath(Path, Name);
if (!File.Exists(FileName)) if (!File.Exists(FileName))
{ {
@ -274,7 +274,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
string Name = ReadUtf8String(Context); string Name = ReadUtf8String(Context);
string DirName = Context.Device.VFs.GetFullPath(Path, Name); string DirName = Context.Device.FileSystem.GetFullPath(Path, Name);
if (!Directory.Exists(DirName)) if (!Directory.Exists(DirName))
{ {
@ -309,7 +309,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
{ {
string Name = ReadUtf8String(Context); string Name = ReadUtf8String(Context);
Context.ResponseData.Write(Context.Device.VFs.GetDrive().AvailableFreeSpace); Context.ResponseData.Write(Context.Device.FileSystem.GetDrive().AvailableFreeSpace);
return 0; return 0;
} }
@ -318,7 +318,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
{ {
string Name = ReadUtf8String(Context); string Name = ReadUtf8String(Context);
Context.ResponseData.Write(Context.Device.VFs.GetDrive().TotalSize); Context.ResponseData.Write(Context.Device.FileSystem.GetDrive().TotalSize);
return 0; return 0;
} }
@ -327,7 +327,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
{ {
string Name = ReadUtf8String(Context); string Name = ReadUtf8String(Context);
string DirName = Context.Device.VFs.GetFullPath(Path, Name); string DirName = Context.Device.FileSystem.GetFullPath(Path, Name);
if (!Directory.Exists(DirName)) if (!Directory.Exists(DirName))
{ {

View file

@ -31,7 +31,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
public long OpenSdCardFileSystem(ServiceCtx Context) public long OpenSdCardFileSystem(ServiceCtx Context)
{ {
MakeObject(Context, new IFileSystem(Context.Device.VFs.GetSdCardPath())); MakeObject(Context, new IFileSystem(Context.Device.FileSystem.GetSdCardPath()));
return 0; return 0;
} }
@ -45,21 +45,21 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
public long OpenSaveDataFileSystem(ServiceCtx Context) public long OpenSaveDataFileSystem(ServiceCtx Context)
{ {
MakeObject(Context, new IFileSystem(Context.Device.VFs.GetGameSavesPath())); MakeObject(Context, new IFileSystem(Context.Device.FileSystem.GetGameSavesPath()));
return 0; return 0;
} }
public long OpenDataStorageByCurrentProcess(ServiceCtx Context) public long OpenDataStorageByCurrentProcess(ServiceCtx Context)
{ {
MakeObject(Context, new IStorage(Context.Device.VFs.RomFs)); MakeObject(Context, new IStorage(Context.Device.FileSystem.RomFs));
return 0; return 0;
} }
public long OpenPatchDataStorageByCurrentProcess(ServiceCtx Context) public long OpenPatchDataStorageByCurrentProcess(ServiceCtx Context)
{ {
MakeObject(Context, new IStorage(Context.Device.VFs.RomFs)); MakeObject(Context, new IStorage(Context.Device.FileSystem.RomFs));
return 0; return 0;
} }

View file

@ -19,7 +19,7 @@ namespace Ryujinx.HLE
internal NvGpu Gpu { get; private set; } internal NvGpu Gpu { get; private set; }
internal VirtualFileSystem VFs { get; private set; } internal VirtualFileSystem FileSystem { get; private set; }
public Horizon System { get; private set; } public Horizon System { get; private set; }
@ -47,7 +47,7 @@ namespace Ryujinx.HLE
Gpu = new NvGpu(Renderer); Gpu = new NvGpu(Renderer);
VFs = new VirtualFileSystem(); FileSystem = new VirtualFileSystem();
System = new Horizon(this); System = new Horizon(this);
@ -78,7 +78,7 @@ namespace Ryujinx.HLE
internal void Unload() internal void Unload()
{ {
VFs.Dispose(); FileSystem.Dispose();
Memory.Dispose(); Memory.Dispose();
} }