mirror of
https://github.com/kwsch/pkNX.git
synced 2026-10-02 06:06:38 -05:00
Improve VFS API
Rename to match actual behaviour and add throw if invalid
This commit is contained in:
@@ -59,24 +59,24 @@ protected MountPoint GetMountPoint(FileSystemPath path)
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public IEnumerable<FileSystemPath> GetEntityPaths(FileSystemPath path, Func<FileSystemPath, bool>? filter = null)
|
||||
public IEnumerable<FileSystemPath> GetEntitiesInDirectory(FileSystemPath directory, Func<FileSystemPath, bool>? filter = null)
|
||||
{
|
||||
var mount = GetMountPoint(path);
|
||||
return mount.FileSystem.GetEntityPaths(path, filter);
|
||||
var mount = GetMountPoint(directory);
|
||||
return mount.FileSystem.GetEntitiesInDirectory(directory, filter);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public IEnumerable<FileSystemPath> GetDirectoryPaths(FileSystemPath path, Func<FileSystemPath, bool>? filter = null)
|
||||
public IEnumerable<FileSystemPath> GetDirectoriesInDirectory(FileSystemPath directory, Func<FileSystemPath, bool>? filter = null)
|
||||
{
|
||||
var mount = GetMountPoint(path);
|
||||
return mount.FileSystem.GetDirectoryPaths(path, filter);
|
||||
var mount = GetMountPoint(directory);
|
||||
return mount.FileSystem.GetDirectoriesInDirectory(directory, filter);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public IEnumerable<FileSystemPath> GetFilePaths(FileSystemPath path, Func<FileSystemPath, bool>? filter = null)
|
||||
public IEnumerable<FileSystemPath> GetFilesInDirectory(FileSystemPath directory, Func<FileSystemPath, bool>? filter = null)
|
||||
{
|
||||
var mount = GetMountPoint(path);
|
||||
return mount.FileSystem.GetFilePaths(path, filter);
|
||||
var mount = GetMountPoint(directory);
|
||||
return mount.FileSystem.GetFilesInDirectory(directory, filter);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
Reference in New Issue
Block a user