mirror of
https://github.com/kwsch/pkNX.git
synced 2026-09-30 13:16:58 -05:00
Add more utility functions to VFS
This commit is contained in:
@@ -31,23 +31,23 @@ public void Dispose()
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public IEnumerable<FileSystemPath> GetEntityPaths(FileSystemPath path)
|
||||
public IEnumerable<FileSystemPath> GetEntityPaths(FileSystemPath path, Func<FileSystemPath, bool>? filter = null)
|
||||
{
|
||||
return FileSystem.GetEntityPaths(ToAbsolutePath(path))
|
||||
return FileSystem.GetEntityPaths(ToAbsolutePath(path), filter)
|
||||
.Select(p => ToRelativePath(p));
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public IEnumerable<FileSystemPath> GetDirectoryPaths(FileSystemPath path)
|
||||
public IEnumerable<FileSystemPath> GetDirectoryPaths(FileSystemPath path, Func<FileSystemPath, bool>? filter = null)
|
||||
{
|
||||
return FileSystem.GetDirectoryPaths(ToAbsolutePath(path))
|
||||
return FileSystem.GetDirectoryPaths(ToAbsolutePath(path), filter)
|
||||
.Select(p => ToRelativePath(p));
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public IEnumerable<FileSystemPath> GetFilePaths(FileSystemPath path)
|
||||
public IEnumerable<FileSystemPath> GetFilePaths(FileSystemPath path, Func<FileSystemPath, bool>? filter = null)
|
||||
{
|
||||
return FileSystem.GetFilePaths(ToAbsolutePath(path))
|
||||
return FileSystem.GetFilePaths(ToAbsolutePath(path), filter)
|
||||
.Select(p => ToRelativePath(p));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user