mirror of
https://github.com/kwsch/pkNX.git
synced 2026-09-30 21:27:24 -05:00
Made VFS fully functional
Still need to start using it, but want to do it a bit slow to test it out. Also should really build some unit tests for this one..
This commit is contained in:
@@ -111,13 +111,13 @@ public bool Exists(FileSystemPath path)
|
||||
|
||||
public Stream CreateFile(FileSystemPath path)
|
||||
{
|
||||
var zae = ZipArchive.CreateEntry(ToEntryPath(path));
|
||||
return zae.Open();
|
||||
ZipArchiveEntry entry = ZipArchive.CreateEntry(ToEntryPath(path));
|
||||
return entry.Open();
|
||||
}
|
||||
|
||||
public Stream OpenFile(FileSystemPath path, FileAccess access)
|
||||
public Stream OpenFile(FileSystemPath path, FileMode mode, FileAccess access)
|
||||
{
|
||||
var entry = ZipArchive.GetEntry(ToEntryPath(path));
|
||||
ZipArchiveEntry? entry = ZipArchive.GetEntry(ToEntryPath(path));
|
||||
return entry?.Open() ?? Stream.Null;
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ public void CreateDirectory(FileSystemPath path)
|
||||
|
||||
public void Delete(FileSystemPath path)
|
||||
{
|
||||
var entry = ZipArchive.GetEntry(ToEntryPath(path));
|
||||
ZipArchiveEntry? entry = ZipArchive.GetEntry(ToEntryPath(path));
|
||||
entry?.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user