Crates.io | cloud-filter |
lib.rs | cloud-filter |
version | 0.0.2 |
source | src |
created_at | 2024-07-02 08:15:41.697271 |
updated_at | 2024-07-05 11:40:22.729506 |
description | A safe and idiomatic wrapper around the Windows Cloud Filter API |
homepage | |
repository | https://github.com/ho-229/cloud-filter-rs |
max_upload_size | |
id | 1289343 |
size | 161,058 |
cloud-filter
is a safe and idiomatic wrapper around the native Windows Cloud Filter API. The Cloud Filter API enables developers to implement their own remote file system from within user space. It is much like FUSE, although it contains many first-class Windows features that are only available through its API.
For example:
As of right now, the Cloud Filter API is used in production by OneDrive, Google Drive, Dropbox, and many other clients.
Below is a simple snippet of implementing a sync engine. For more, in-depth examples, please check out the examples directory.
Unfortunately, FUSE is only implemented for Unix-like operating systems. Luckily, there are numerous alternatives for implementing file systems on Windows, such as dokany
or winfsp
.
dokany
?dokany
has a Rust API and is accessible using safe code. However, it is fairly low-level and does not have the first-class capabilities supported by cloud-filter
.
winfsp
?Unlike dokany
, winfsp
currently does not have a Rust API. Perhaps at some point it may, but even so, it is impossible to have the first-class features supported by cloud-filter
.
Placeholders are internally NTFS sparse files and some reparse point magic. To put it simple, they are empty files that are meant to represent real files, although are not backed by any allocation unless requested. The way they work is heavily dependent on the sync engines' configuration. Know that if a process were to read the content of the placeholder, it would be "hydrated" (its file contents would be allocated). For more information, read here.
cloud-filter
is maintained, but does Microsoft maintain the Cloud Filter API?Of course, it is used by Microsoft's very own OneDrive Client. I have reported numerous issues and received quick feedback via the Microsoft Q&A. There are a lot of undocumented and unimplemented portions of the API, although they are not necessary for the features described.
cloud-filter
only for remote files?You are more than welcome to use it for local files, although the extra features may not suit your needs. It is recommended to instead use ProjFS, of which is also backed by Microsoft, but dedicated to "high-speed backing data stores."
If you are looking to contribute or want a deeper understanding of cloud-filter
, be sure to check out these resources:
Windows.Storage.Provider
namespace are used by cloud providers.