TagBites.IO
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.
One API, any storage
Section titled “One API, any storage”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.
Built-in file systems
Section titled “Built-in file systems”| 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.
Installation
Section titled “Installation”Install the core package, plus one package per storage you need to talk to:
dotnet add package TagBites.IOdotnet add package TagBites.IO.Ftpdotnet add package TagBites.IO.Sftpdotnet add package TagBites.IO.Httpdotnet add package TagBites.IO.Zipdotnet add package TagBites.IO.Dropboxdotnet add package TagBites.IO.Googledotnet add package TagBites.IO.S3dotnet add package TagBites.IO.WinDriveMore examples
Section titled “More examples”Checking if a file exists.
Section titled “Checking if a file exists.”var exists = FileSystem.Local.GetFile("file.txt").Exists;Read all text from a file.
Section titled “Read all text from a file.”var content = FileSystem.Local.GetFile("file.txt").ReadAllText();Asynchronously write the text to a file.
Section titled “Asynchronously write the text to a file.”await FileSystem.Local.GetFile("file.txt").WriteAllTextAsync("test content");Rename the file.
Section titled “Rename the file.”FileSystem.Local.GetFile("file.txt").Rename("newTest");Move and overwrite the file.
Section titled “Move and overwrite the file.”var source = FileSystem.Local.GetFile("a/test2.txt");var destination = FileSystem.Local.GetFile("b/test2.txt");source.Move(destination, true);Move the directory to a new location.
Section titled “Move the directory to a new location.”var source = FileSystem.Local.GetDirectory("a/c");var destination = FileSystem.Local.GetDirectory("b");source.MoveTo(destination); // b/c/*Restore a previous version of the file.
Section titled “Restore a previous version of the file.”// 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.