Introduction
Welcome to CBFS Sync, a suite of classes enabling seamless synchronization between local files and Cloud Storage or other remote repositories.
Add OneDrive-style, bi-directional synchronization to your applications with CBFS Sync. The event-driven design of CBFS Sync provides an intuitive way to handle operations performed on local files and folders. When remote changes are made, use the included methods to notify the local system.
The CBSync class builds on industry-standard technologies, including the Cloud Filter API on Windows, FUSE on Linux, and File Provider on macOS. CBSync reduces development time and improves user experience by providing a single API. All icons and indicators visible to the user are presented by the operating system, ensuring a native experience.
The choice of the remote storage location is entirely up to you. Whether your data is stored on a popular cloud storage service, a custom file server, or anywhere else, CBFS Sync provides a simple API to facilitate synchronization. CBFS Sync handles integration with the OS, while your code is responsible for responding to events and transferring data between local and remote systems. Because your code interacts with the backend, you can also decide to make the synchronization one-way or bidirectional.
CBSync | The CBSync component enables seamless synchronization between local files and Cloud Storage or other remote repositories. |
Additional Information
You will always find the latest information about CBFS Sync at our web site: www.callback.com. We offer free, fully-functional 30-day trials for all of our products, and our technical support staff are happy to answer any questions you may have during your evaluation.
Please direct all technical questions to support@callback.com. To help support technicians assist you as quickly as possible, please provide an detailed and accurate description of your problem, the results you expected, and the results that you received while using our product. For questions about licensing and pricing, and all other general inquiries, please contact sales@callback.com.
Thank You!
Thank you for choosing CBFS Sync for your development needs. We realize that you have a choice among development tools, and that by choosing us you are counting on us to be a key component in your business. We work around the clock to provide you with ongoing enhancements, support, and innovative products; and we will always do our best to exceed your expectations!
Deployment
The user-mode library comes in It has one or two forms depending on the platform:
- Dynamic:
- Windows: As dynamic libraries with import libraries, named cbfssync22.dll and cbfssync22.lib, respectively (available for x64, ARM64, and x86 processor architectures)
- Linux: As dynamic libraries, named libcbfssync.so.22.0 (available for x64 and x86 processor architectures)
- macOS: As dynamic libraries, named libcbfssync22.0.dylib (available for x64 and ARM64 processor architectures)
- Static:
- Windows: As static libraries, which do not require a dynamic library, named cbfssync22s.lib.
Windows:
Use the DLL with the import library if incompatibilities occur between the compilation and linkage options set in your project and the options with which the library was compiled.
When linking the static library, no extra user-mode library files need to be deployed with the application. When using the DLL, deploy the .dll file to the target system and place it next to the application's .exe file.
Note: When linking the static library, the Windows library version.lib must be included in the linker options.
Linux:
To link the CBSync class to your application and use them properly, the FUSE 2.9 package must be installed in your development system. This can be achieved using the following commands:
- RedHat/CentOS and derivative Linux distributions: sudo yum install fuse-devel
- Debian/Ubuntu and derivative Linux distributions: sudo apt-get install libfuse-dev
- RedHat/CentOS and derivative Linux distributions: sudo yum install fuse-libs
- Debian/Ubuntu and derivative Linux distributions: sudo apt-get install libfuse2
Constants
All constants are accessible through the cbyConstants namespace declared in the cbfssync.h file.
File Attributes |
||
CBFSSYNC_ATTR_NORMAL | 0x00000001 |
The item is a normal file or folder with no other attributes. This attribute may be used to clear any other attributes that may be set on the file or folder.
|
CBFSSYNC_ATTR_READONLY | 0x00000002 |
The item is read-only.
Note: This attribute is not used by CBFS Sync, but it can be set and retrieved. |
CBFSSYNC_ATTR_HIDDEN | 0x00000004 |
The item is hidden.
Note: This attribute is not used by CBFS Sync, but it can be set and retrieved. |
CBFSSYNC_ATTR_SYSTEM | 0x00000008 |
The item is a system file or folder.
Note: This attribute is not used by CBFS Sync, but it can be set and retrieved. |
CBFSSYNC_ATTR_PINNED | 0x00100000 |
Indicates that the item is pinned and always available on the system. This value is only applicable in Windows.
|
CBFSSYNC_ATTR_UNPINNED | 0x00200000 |
Indicates that the item is unpinned. This value is only applicable in Windows.
|
File Status Flags |
||
CBFSSYNC_STATUS_DOWNLOADED | 0x00000001 |
Indicates that the item is downloaded.
|
Indicators of file properties update |
||
CBFSSYNC_ITEM_CTIME | 0x0002 |
Creation time has been changed.
|
CBFSSYNC_ITEM_MTIME | 0x0004 |
Modification (Last Write) time has been changed.
|
CBFSSYNC_ITEM_ATIME | 0x0008 |
Last access time has been changed.
|
CBFSSYNC_ITEM_ATTRIBUTES | 0x0020 |
File attributes or security flags have been updated.
|
CBFSSYNC_ITEM_CONTENT | 0x0040 |
Files: content has been updated.
Not used for folders. |
CBFSSYNC_ITEM_RESTORED_FROM_TRASH | 0x0080 |
A file or folder was restored from Trash (macOS only).
|
DeleteItem event flags |
||
CBFSSYNC_DELETE_TO_BIN | 0x00000001 |
An item was moved to Recycle Bin / Trash rather than deleted.
|
Result Codes |
||
CBFSSYNC_PENDING | 0x21000001 |
Operation will be completed later.
|
CBFSSYNC_ERR_SYNC_NOT_ACTIVE | 0x21000002 |
Component is not active.
|
CBFSSYNC_ERR_SYNC_IS_ACTIVE | 0x21000003 |
Component is active.
|
CBFSSYNC_ERR_INVALID_PARAMETER | 0x21000004 |
Invalid parameter.
|
CBFSSYNC_ERR_INVALID_HANDLE | 0x21000005 |
Invalid handle.
|
CBFSSYNC_ERR_OPERATION_DENIED | 0x21000006 |
Operation denied.
|
CBFSSYNC_ERR_INITIALIZATION_FAILED | 0x21000007 |
Component initialization failed.
|
CBFSSYNC_ERR_NOT_INSTALLED | 0x21000008 |
The Install method must be called before performing this operation.
|
CBFSSYNC_ERR_TOO_MANY_ITEMS | 0x21000010 |
Too many items returned during enumeration.
|
CBFSSYNC_ERR_ITEM_INFO_NOT_PROVIDED | 0x21000011 |
Requested file or folder information was not provided.
|
CBFSSYNC_ERR_ITEM_NOT_FOUND | 0x21000012 |
Requested file or folder was not found.
|
CBFSSYNC_ERR_FILE_ALREADY_EXISTS | 0x21000013 |
File already exists.
|
CBFSSYNC_ERR_INVALID_ITEM_NAME | 0x21000014 |
Invalid item name returned during enumeration.
|
CBFSSYNC_ERR_INVALID_ITEM_ID | 0x21000015 |
Invalid item Id returned during enumeration.
|
CBFSSYNC_ERR_INVALID_ATTRIBUTES | 0x21000016 |
Invalid item attributes returned during enumeration.
|
CBFSSYNC_ERR_INVALID_ITEM_PROPERTY | 0x21000017 |
Invalid item property value returned during enumeration.
|
CBFSSYNC_ERR_READ_OPERATION_ERROR | 0x21000030 |
Read operation failed.
|
CBFSSYNC_ERR_READ_OPERATION_CANCELED | 0x21000031 |
Read operation canceled.
|
CBFSSYNC_ERR_OS_ERROR | 0x21000041 |
Operating system API error.
|