Skip to content
Auto
TagBites.IO

TagBites.IO

NuGet NuGet downloads

TagBites.IO turns “the local disk”, “an FTP server”, “a Dropbox account” and “an S3 bucket” into the same thing: a FileSystem you browse with FileLink/DirectoryLink. Write the operation once - copy, move, sync, watch, restore a version - and it works no matter where the files actually live, without ever touching a provider-specific SDK.

Restore yesterday’s S3 backup to disk:

TagBites.IO.S3.S3FileSystem.Create(serviceUrl, accessKey, secretKey, "backups")
.GetDirectory("2026-07-04")
.CopyTo(FileSystem.Local.GetDirectory("C:/Restore"));

Turn Dropbox, an S3 bucket and a local folder into one Windows drive:

var merged = new VirtualDirectory
{
Entries =
{
new VirtualDirectoryEntry(TagBites.IO.Dropbox.DropboxFileSystem.Create(dropboxToken).GetDirectory("Photos"), "Dropbox"),
new VirtualDirectoryEntry(TagBites.IO.S3.S3FileSystem.Create(serviceUrl, accessKey, secretKey, "bucket").GetDirectory("backups"), "S3"),
new VirtualDirectoryEntry(FileSystem.Local.GetDirectory("C:/Files"), "Local")
}
};
new WinDrive(merged.ToDirectory()) { Name = "Merged Drive" }.Mount(); // "V:\Dropbox", "V:\S3", "V:\Local"

Keep a local folder and an FTP folder live-mirrored, in both directions, for as long as the process runs:

var synchronizer = new FileSystemLinkSynchronizer();
synchronizer.Add(FileSystem.Local.GetDirectory("C:/Photos"), ftpFileSystem.GetDirectory("photos"), FileSystemSynchronizeMode.BothWaysUsingLastWriteTime);
synchronizer.Enabled = true;

See virtual file system and WinDrive for the details behind the second example, and synchronization for an important caveat about what the third example detects on the FTP side.

File system Package Storage
FileSystem.Local TagBites.IO Local disk (System.IO)
VirtualFileSystem TagBites.IO In-memory composition of other file/directory links into one tree
FtpFileSystem TagBites.IO.Ftp FTP / FTPS
SftpFileSystem TagBites.IO.Sftp SFTP
HttpFileSystem TagBites.IO.Http HTTP (read-only, directory listing files)
ZipFileSystem TagBites.IO.Zip ZIP archive
DropboxFileSystem TagBites.IO.Dropbox Dropbox
GoogleFileSystem TagBites.IO.Google Google Cloud Storage
S3FileSystem TagBites.IO.S3 Amazon S3 and S3 compatible storage (e.g. Cloudflare R2)

and also allows you to create your custom file system.

Additionally, TagBites.IO.WinDrive lets you mount any DirectoryLink - regardless of the underlying file system - as a real Windows drive letter.

Install the core package, plus one package per storage you need to talk to:

dotnet add package TagBites.IO
dotnet add package TagBites.IO.Ftp
dotnet add package TagBites.IO.Sftp
dotnet add package TagBites.IO.Http
dotnet add package TagBites.IO.Zip
dotnet add package TagBites.IO.Dropbox
dotnet add package TagBites.IO.Google
dotnet add package TagBites.IO.S3
dotnet add package TagBites.IO.WinDrive
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/*
// fileSystem is a custom file system whose operations implement IFileSystemHistoryOperations, see file history and versioning.
var file = fileSystem.GetFile("file.txt");
var fileVersion = file.GetHistoryVersions().FirstOrDefault(v => v.ModifyTime >= DateTime.Now.Date.AddDays(-7));
fileVersion?.Restore();

See file history and versioning for details.

One-time synchronization of directory contents between file systems.

Section titled “One-time synchronization of directory contents between file systems.”
var ftpFileSystem = TagBites.IO.Ftp.FtpFileSystem.Create(/*parameters*/);
var localFileSystem = FileSystem.Local;
var directory1 = ftpFileSystem.GetDirectory("directory1");
var directory2 = localFileSystem.GetDirectory("directory2");
directory1.SyncWith(directory2, FileSystemSynchronizeMode.OneWay);

See synchronization for a continuously running alternative, and change notifications and watching for reacting to changes as they happen.