Mounting Multiple Cloud Storage Providers as Local Drives in .NET Applications


Introduction

"Mount cloud storage as a local drive" is a well-solved problem for end users. Tools like rclone, ExpanDrive, and CloudMounter do this well, and they're what comes up whenever the question is asked. None of them are something you embed in your own application. They're standalone programs a person installs and runs themselves, with no API for a third-party product to call.

That's a different question from the one a developer is actually asking when they want this capability built into their own .NET application: mount a customer's S3 bucket, Azure container, or Google Drive as a drive letter from inside your own product, with your own UI and your own error handling, not by shelling out to someone else's desktop tool. This article covers what the commonly recommended tools actually are, and where CBFS Cloud fits for the cases they don't cover.

rclone is the tool that comes up most often. It's MIT-licensed, open source, and supports dozens of storage backends, but it's a command-line program, not a library. Its mount feature works by running a local process that presents a filesystem, and on Windows that process depends on WinFsp being installed separately. Embedding it in a product means shipping and managing an external process and its dependency, not calling an API.

ExpanDrive and CloudMounter are commercial desktop applications aimed directly at end users who want to mount their own cloud accounts. Neither exposes an SDK or a redistributable component; they're products you buy and run, not something you build into another product.

goofys and s3fs-fuse are open-source and closer to library territory, but both are Linux-only, built on FUSE, and scoped to S3 specifically rather than multiple providers behind one interface.

None of these are wrong answers to "how do I mount cloud storage as a drive." They're just answers to a different question than "how do I build this into my .NET application."

What CBFS Cloud Actually Provides

CBFS Cloud's CBCloudDrive component mounts a cloud storage service or remote file server as a local drive, backed by a kernel-mode driver that does the actual filesystem work. Supported connection types include Amazon S3 and other S3-compatible providers, Azure Blob Storage, Azure Files, Google Drive, Microsoft OneDrive, Oracle Cloud Object Storage, Cloudflare R2, SFTP, and NFS. Each component instance manages one mounted drive, and an application can create multiple instances to mount several providers at once.

Getting a drive mounted is a small number of steps: install the driver once, configure the connection type and its parameters, point the component at a local cache directory, and call Mount.

CBCloudDrive drive = new CBCloudDrive();
// Install the driver if it isn't already present. In production this // is normally done ahead of time by the application's installer. drive.ProductGUID = "{YOUR-PRODUCT-GUID}"; if (drive.GetDriverStatus() == 0) { int result = drive.Install("/path/to/cbfs.cab"); if (result != 0) { Console.WriteLine("Reboot required to complete driver installation."); return; } }
// Configure the connection. Only ConnectionType and ConnectionString // change between providers; everything else here stays the same. drive.ConnectionType = CBCloudDriveConnectionTypes.ctS3; drive.ConnectionString = "RemoteRoot=/my-bucket;AccessKey=MYACCESSKEY;SecretKey=MYSECRETKEY;";
drive.CacheDirectory = @"C:\my-app\cache"; drive.DriveName = "My Cloud Drive"; string mountPoint = drive.Mount(""); Console.WriteLine("Drive mounted at: " + mountPoint);

Reads and writes go through a local disk cache rather than waiting on the network directly: reads are served from cache once a file has been fetched, and writes are staged locally and uploaded in the background, with automatic retry on failure. ListCacheFiles lets the application check what's still pending or has failed, so a product can surface upload status or handle a failure explicitly rather than losing track of it.

Scope: What This Is, and Isn't

CBFS Cloud is a .NET library and a Windows kernel-mode driver. It doesn't run on Linux or macOS, and there's no indication in the current documentation that it will. If an application needs the same capability across multiple operating systems, or isn't built on .NET, CBFS Cloud isn't a fit today, and nothing here should be read as claiming otherwise.

When This Matters

If the goal is mounting your own cloud storage for your own use, rclone, ExpanDrive, or CloudMounter are the right tools, and cheaper than an SDK license. If the goal is shipping a Windows .NET application that mounts a customer's cloud storage as a drive, with your own connection UI, caching behavior, and error handling, that's the case none of the commonly recommended tools actually address, and it's what CBFS Cloud is built for.

We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@callback.com.