libnetconf  0.10.0-146_trunk
NETCONF Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
File Datastore

Specific functions for NCDS_FILE_DS type of datastore implementation. More...

Collaboration diagram for File Datastore:

Functions

int ncds_file_set_path (struct ncds_ds *datastore, const char *path)
 Assign the path of the datastore file into the datastore structure. More...
 

Detailed Description

Specific functions for NCDS_FILE_DS type of datastore implementation.

Function Documentation

int ncds_file_set_path ( struct ncds_ds *  datastore,
const char *  path 
)

Assign the path of the datastore file into the datastore structure.

Checks if the file exist and is accessible for reading and writing. If the file does not exist, it is created. The file is opened and the file descriptor is stored in the structure.

Parameters
[in]datastoreDatastore structure to be configured.
[in]pathFile path to the file storing configuration datastores.
Returns
  • 0 on success
  • -1 Invalid datastore
  • -2 Invalid path ((does not exist && can not be created) || insufficient rights)