This is a .NET library and CLI utility for reading & managing the hydration and pin status of files on cloud drives like iCloud Drive or OneDrive.
- CloudFileStatusManager
- Contains the
ICloudFileStatusManagerinterface, and enums for the hydration and pin status of files. This is a cross-platform package and required in all cases.
- Contains the
- CloudFileStatusManager.Windows
- Contains the Windows implementation of the
ICloudFileStatusManagerinterface.
- Contains the Windows implementation of the
- CloudFileStatusManager.macOS
- Contains the macOS implementation of the
ICloudFileStatusManagerinterface.
- Contains the macOS implementation of the
- Read the hydration status (whether or not the file has been downloaded locally) of files on cloud drives.
- Manage the hydration status of files on cloud drives (hydrate or dehydrate files).
- Tested only with iCloud Drive and OneDrive, but may work for other providers.
- On Windows, any cloud drive implemented with the Cloud Filter API should work.
- On macOS, the implementation uses NSURL ubiquitous item APIs which are designed for iCloud, but path-based detection is also available for OneDrive.
- CloudFileStatusManager project
- Produces the CloudFileStatusManager package (
com.wkoorts.CloudFileStatusManager). - Contains the
ICloudFileStatusManagerinterface, and enums for the hydration and pin status of files.
- Produces the CloudFileStatusManager package (
- CloudFileStatusManager.Windows project
- Produces the CloudFileStatusManager.Windows package (
com.wkoorts.CloudFileStatusManager.Windows). - Contains the Windows implementation of the
ICloudFileStatusManagerinterface.
- Produces the CloudFileStatusManager.Windows package (
- CloudFileStatusManager.macOS project
- Produces the CloudFileStatusManager.macOS package (
com.wkoorts.CloudFileStatusManager.macOS). - Contains the macOS implementation of the
ICloudFileStatusManagerinterface.
- Produces the CloudFileStatusManager.macOS package (
- CloudFileStatusManager.CLI.Common project
- Contains shared CLI command logic used by both platform-specific CLI applications.
- CloudFileStatusManager.CLI.Windows project
- Command-line interface for Windows.
- CloudFileStatusManager.CLI.macOS project
- Command-line interface for macOS.
Binaries for the CLI are available to download from the Releases page.
$ ./cfsm.exe --help
Description:
Cloud File Status Manager CLI for Windows
Usage:
cfsm [command] [options]
Options:
-v, --verbose Show verbose output
--version Show version information
-?, -h, --help Show help and usage information
Commands:
is-on-cloud-storage <file> Check if a file is on cloud storage
get-hydration-status <file> Get the hydration status of a file
get-pin-status <file> Get the pin status of a file
hydrate <file> Hydrate a file
dehydrate <file> Dehydrate a file$ ./cfsm --help
Description:
Cloud File Status Manager CLI for macOS
Usage:
cfsm [command] [options]
Options:
-v, --verbose Show verbose output
--version Show version information
-?, -h, --help Show help and usage information
Commands:
is-on-cloud-storage <file> Check if a file is on cloud storage
get-hydration-status <file> Get the hydration status of a file
get-pin-status <file> Get the pin status of a file
hydrate <file> Hydrate a file
dehydrate <file> Dehydrate a fileThank you to Hunter Ratliff, who explained how file attributes in Windows represent the various states of files on cloud drives in this blog post.