Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.

Documentation

mmoadeli edited this page Jun 26, 2013 · 12 revisions

Overview

MaidSafe-Drive is a virtual drive offering services to store and retrieve information to any storage media including network file systems. The library's interface is provided in the following files:

drive_api.h - this is the main API and is the base class for classes defined in unix_drive.h and win_drive.h
win_drive.h - this offers the implementation of drive APIs in Windows
unix_drive.h - this offers the implementation of drive APIs in Linux
config.h - provides const library configuration variables and return codes
return_codes.h - This file will be removed when this library is upgraded to modern c++.

The library depends on the MaidSafe libraries Common, Encrypt and Network-Filesystem.

MaidSafe-Drive behaves similar to any other drives in the system and as such needs access to libraries which are native to the system in order to mount the drive and to offer normal IO operations. MaidSafe-Drive in Linux, Mac and Windows relies on Fuse, OSXFuse and CBFS libraries, respectively, to deliver its functionality.
MaidSafe-Drive defines different access levels to the content of the drive. Data may be accessed by only owner, a group or public.
MaidSafe-Drive delivers most of its functionality in combination with the services provided by MaidSafe-Encrypt. Storing a file in the MaidSafe-Drive involves splitting the file to the chunks of known size and encrypting each one using the hash of its two previous chunks. A more detailed explanation of file storage and retrieval may be found at MaidSafe-Encrypt.

Details

drive_api.h provides the APIs to manipulate the information in MaidSafe-Drive. The APIs include functions to add, remove, rename and truncate files.
There are also functions to retrieve/store DataMaps (structs holding the encryption details of a single file). These functions deal directly with encrypted entities.
Moreover, since hidden files behave differently, there are APIs to operate on hidden files.