Lightweight and simple .NET library provides facilities for performing operations on file systems.
TagBites.IO provides implementation for many built-ins file systems:
and also allows you to create your custom file system.
NuGet Package: https://www.nuget.org/packages/TagBites.IO/
var exists = FileSystem.Local.GetFile("file.txt").Exists;
var content = FileSystem.Local.GetFile("file.txt").ReadAllText();
await FileSystem.Local.GetFile("file.txt").WriteAllTextAsync("test content");
FileSystem.Local.GetFile("file.txt").Rename("newTest");
var source = FileSystem.Local.GetFile("a/test2.txt");
var destination = FileSystem.Local.GetFile("b/test2.txt");
source.Move(destination, true);
var source = FileSystem.Local.GetDirectory("a/c");
var destination = FileSystem.Local.GetDirectory("b");
source.MoveTo(destination); // b/c/*
var file = FileSystemWithHistorySupport.Create().GetFile("file.txt");
var fileVersion = file.GetHistoryVersions(DateTime.Now.Date.AddDays(-7)).FirstOrDefault();
fileVersion.Copy(file, true) ;
var ftpFileSystem = FtpFilesystem.Create(/*parameters*/);
var localFileSystem = FileSystem.Local;
var directory1 = localFileSystem.GetDirectory("directory1");
var directory2 = localFileSystem.GetDirectory("directory2");
directory1.SyncWith(directory2, FileSystemSynchronizeMode.OneWay);