目录

Cloud Disk Foundation Overview

Cloud Disk Foundation maps cloud files to the local file system for cloud disk provider applications. After registering a cloud disk directory as a sync root, an application can use the Cloud Disk Foundation APIs (oh_cloud_disk_manager.h) to map cloud files to local placeholder files. Only metadata, such as file names, logical sizes, and modification times, is retained locally; actual contents are downloaded on demand.

As a system-level platform capability, Cloud Disk Foundation provides sync root management, file change monitoring and synchronization state management, placeholder file lifecycle management, and on-demand hydration/dehydration. It helps cloud disk provider applications integrate with the file manager while ensuring a consistent user experience and data reliability.

Capabilities

When to Use

Basic Concepts

Working Principles

Cloud Disk Foundation provides cloud disk provider applications with core APIs for sync root management, placeholder operations, and on-demand hydration/dehydration. After registering a cloud disk directory as a sync root, an application can call APIs in oh_cloud_disk_manager.h to create placeholders under it, identify placeholder states, update metadata, and respond to hydration/dehydration callbacks. Other file operations (opening, reading, renaming, deleting, and so on) use standard file access APIs. The system protects placeholder semantics and orchestrates synchronization in the background.

Cloud Disk Foundation is built on system-level services, with the following layers: