Add delete mode options for VFS

This commit is contained in:
duckdoom4
2023-09-09 20:08:29 +02:00
parent 994a19466f
commit dc63ab38dc
10 changed files with 49 additions and 13 deletions

View File

@@ -5,6 +5,14 @@
namespace pkNX.Containers.VFS;
public enum DeleteMode
{
TopMostLayer,
TopMostWriteableLayer,
AllWritable,
All
}
public interface IFileSystem : IDisposable
{
bool IsReadOnly => false;
@@ -53,7 +61,8 @@ public interface IFileSystem : IDisposable
/// Deletes the specified file or directory. Does not throw an exception if the specified file or directory does not exist.
/// </summary>
/// <param name="path">The path and name of the file or directory to delete.</param>
void Delete(FileSystemPath path);
/// <param name="mode">The method to use when deleting the file or directory.</param>
void Delete(FileSystemPath path, DeleteMode mode = DeleteMode.TopMostLayer);
public void Move(FileSystemPath sourcePath, IFileSystem destinationFileSystem, FileSystemPath destinationPath)
{