irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Collaboration diagram for Client Collection Operations:

Functions

int rcCloseCollection (rcComm_t *conn, int handleInxInp)
 
int rcCollCreate (rcComm_t *conn, collInp_t *collCreateInp)
 
int rcCollRepl (rcComm_t *conn, collInp_t *collReplInp, int vFlag)
 
int rcOpenCollection (rcComm_t *conn, collInp_t *openCollInp)
 
int rcPhyBundleColl (rcComm_t *conn, structFileExtAndRegInp_t *phyBundleCollInp)
 
int rcReadCollection (rcComm_t *conn, int handleInxInp, collEnt_t **collEnt)
 
int rcRmColl (rcComm_t *conn, collInp_t *rmCollInp, int vFlag)
 
int rcSyncMountedColl (rcComm_t *conn, dataObjInp_t *syncMountedCollInp)
 

Detailed Description

Function Documentation

◆ rcCloseCollection()

rcCloseCollection ( rcComm_t conn,
int  handleInxInp 
)
Description:\n Close an opened collection (from rcOpenCollection).
This is equivalent to closedir of UNIX.
Primary User:\n client
Since
1.0
Remarks
none
Note
none
Example Usage:\n
Open the collection /myZone/home/john/coll1/coll2 for recursive query and read from it.
int status, handleInx;
collInp_t collOpenInp;
collEnt_t *collEnt = NULL;
bzero (&collOpenInp, sizeof (collOpenInp));
rstrcpy (collOpenInp.collName, "/myZone/home/john/coll1/coll2", MAX_NAME_LEN);
collOpenInp.flags = RECUR_QUERY_FG | VERY_LONG_METADATA_FG;
handleInx = rcOpenCollection (conn, &collOpenInp);
if (handleInx < 0) {
.... handle the error
}
while ((status = rcReadCollection (conn, handleInx, &collEnt)) >= 0) {
if (collEnt->objType == DATA_OBJ_T) {
# handle the data object
} else if (collEnt->objType == COLL_OBJ_T) {
# handle the subcollection
}
freeCollEnt (collEnt);
}
# close the collection
rcCloseCollection (conn, handleInx);
Parameters
[in]conn- A rcComm_t connection handle to the server.
[in]handleInxInp- The opened collection index from rcOpenCollection.
Returns
integer
Return values
0on success
Side Effect:\n none
Precondition
none
Postcondition
none
See also
rclOpenCollection/rclReadCollection/rclCloseCollection. The query for these functions is done by the client and the query results are cached locally making it more efficient.

Definition at line 68 of file rcCloseCollection.cpp.

References CLOSE_COLLECTION_AN, NULL, procApiRequest(), and irods.pypyodbc::status.

Here is the call graph for this function:

◆ rcCollCreate()

rcCollCreate ( rcComm_t conn,
collInp_t collCreateInp 
)
Description:\n Create a collection. This is equivalent to mkdir of UNIX.
Primary User:\n client
Since
1.0
Remarks
none
Note
none
Example Usage:\n
Create a collection /myZone/home/john/coll1/coll2 and make parent collections as needed:
int status;
collInp_t collCreateInp;
bzero (&collCreateInp, sizeof (collCreateInp));
rstrcpy (collCreateInp.collName, "/myZone/home/john/coll1/coll2", MAX_NAME_LEN);
addKeyVal (&collCreateInp.condInput, RECURSIVE_OPR__KW, "");
status = rcCollCreate (conn, &collCreateInp);
if (status < 0) {
.... handle the error
}
Parameters
[in]conn- A rcComm_t connection handle to the server.
[in]collCreateInp- Elements of collInp_t used :
  • char collName[MAX_NAME_LEN] - full path of the collection.
  • keyValPair_t condInput - keyword/value pair input. Valid keywords:
    RECURSIVE_OPR__KW - make parent collections as needed. This keyWd has no value.
Returns
integer
Return values
0on success
Side Effect:\n none
Precondition
none
Postcondition
none
See also
none

Definition at line 58 of file rcCollCreate.cpp.

References COLL_CREATE_AN, NULL, procApiRequest(), and irods.pypyodbc::status.

Referenced by mkColl(), mkdirUtil(), and rsCollCreate().

Here is the call graph for this function:

◆ rcCollRepl()

rcCollRepl ( rcComm_t conn,
collInp_t collReplInp,
int  vFlag 
)
Description:\n Replicate a collection.
Primary User:\n client
Since
1.0
Remarks
none
Note
none
Parameters
[in]conn- A rcComm_t connection handle to the server.
[in]collReplInp- Collection to replicate
[in]vFlag- verbose flag
Returns
integer
Return values
0on success
Side Effect:\n none
Precondition
none
Postcondition
none
See also
none

Definition at line 50 of file rcCollRepl.cpp.

References _rcCollRepl(), cliGetCollOprStat(), NULL, and irods.pypyodbc::status.

Here is the call graph for this function:

◆ rcOpenCollection()

rcOpenCollection ( rcComm_t conn,
collInp_t openCollInp 
)
Description:\n Open a collection for subsequent read (rcReadCollection).
This is equivalent to opendir of UNIX.
Primary User:\n client
Since
1.0
Remarks
none
Note
none
Example Usage:\n
Open the collection /myZone/home/john/coll1/coll2 for recursive query and read from it.
int status, handleInx;
collInp_t collOpenInp;
collEnt_t *collEnt = NULL;
bzero (&collOpenInp, sizeof (collOpenInp));
rstrcpy (collOpenInp.collName, "/myZone/home/john/coll1/coll2", MAX_NAME_LEN);
collOpenInp.flags = RECUR_QUERY_FG | VERY_LONG_METADATA_FG;
handleInx = rcOpenCollection (conn, &collOpenInp);
if (handleInx < 0) {
.... handle the error
}
while ((status = rcReadCollection (conn, handleInx, &collEnt)) >= 0) {
if (collEnt->objType == DATA_OBJ_T) {
# handle the data object
} else if (collEnt->objType == COLL_OBJ_T) {
# handle the subcollection
}
freeCollEnt (collEnt);
}
# close the collection
rcCloseCollection (conn, handleInx);
Parameters
[in]conn- A rcComm_t connection handle to the server.
[in]openCollInp- Elements of collInp_t used :
  • char collName[MAX_NAME_LEN] - full path of the collection.
  • int flags - Valid flags are:
    LONG_METADATA_FG - the subsequent read (rcReadCollection) returns verbose metadata.
    VERY_LONG_METADATA_FG - the subsequent read returns very verbose metadata.
    RECUR_QUERY_FG - the query is recursive. i.e., contents of all sub-collections are also returned.
    DATA_QUERY_FIRST_FG - the query returns data objects in the collection first, then the sub-collections. Normally it is the other way around.
    INCLUDE_CONDINPUT_IN_QUERY - additional selection screening base on condInput.
    These flags can be combined with the "or" operator.
    e.g., flags = LONG_METADATA_FG|RECUR_QUERY_FG.
  • keyValPair_t condInput - keyword/value pair input. Valid keywords:
    RESC_NAME_KW - selection only data objects in this resource. The INCLUDE_CONDINPUT_IN_QUERY flag must be on to be effective.
    RESC_NAME_KW - selection only data objects in this resource group. The INCLUDE_CONDINPUT_IN_QUERY flag must be on to be effective.
Returns
integer
Return values
theopened collection handle on success
Side Effect:\n none
Precondition
none
Postcondition
none
See also
rclOpenCollection/rclReadCollection/rclCloseCollection. The query for these functions is done by the client and the query results are cached locally making it more efficient.

Definition at line 88 of file rcOpenCollection.cpp.

References NULL, OPEN_COLLECTION_AN, procApiRequest(), and irods.pypyodbc::status.

Here is the call graph for this function:

◆ rcPhyBundleColl()

rcPhyBundleColl ( rcComm_t conn,
structFileExtAndRegInp_t phyBundleCollInp 
)
Description:\n Bundle a physical collection
Primary User:\n client
Since
1.0
Remarks
none
Note
none
Parameters
[in]conn- A rcComm_t connection handle to the server.
[in]phyBundleCollInp- The phyBundleColl structFileExtAndRegInp_t
Returns
integer
Return values
0on success
Side Effect:\n none
Precondition
none
Postcondition
none
See also
none

Definition at line 33 of file rcPhyBundleColl.cpp.

References NULL, PHY_BUNDLE_COLL_AN, procApiRequest(), and irods.pypyodbc::status.

Referenced by phybunUtil(), and remotePhyBundleColl().

Here is the call graph for this function:

◆ rcReadCollection()

rcReadCollection ( rcComm_t conn,
int  handleInxInp,
collEnt_t **  collEnt 
)
Description:\n Read from an opened collection (from rcOpenCollection).
The result is returned in a collEnt_t structure. This is equivalent to readdir of UNIX.
Primary User:\n client
Since
1.0
Remarks
none
Note
none
Example Usage:\n
Open the collection /myZone/home/john/coll1/coll2 for recursive query and read from it.
int status, handleInx;
collInp_t collOpenInp;
collEnt_t *collEnt = NULL;
bzero (&collOpenInp, sizeof (collOpenInp));
rstrcpy (collOpenInp.collName, "/myZone/home/john/coll1/coll2", MAX_NAME_LEN);
collOpenInp.flags = RECUR_QUERY_FG | VERY_LONG_METADATA_FG;
handleInx = rcOpenCollection (conn, &collOpenInp);
if (handleInx < 0) {
.... handle the error
}
while ((status = rcReadCollection (conn, handleInx, &collEnt)) >= 0) {
if (collEnt->objType == DATA_OBJ_T) {
# handle the data object
} else if (collEnt->objType == COLL_OBJ_T) {
# handle the subcollection
}
freeCollEnt (collEnt);
}
# close the collection
rcCloseCollection (conn, handleInx);
Parameters
[in]conn- A rcComm_t connection handle to the server.
[in]handleInxInp- The opened collection index from rcOpenCollection.
[out]collEnt- A point to a collEnt_t structure containing the result of the read.
Returns
integer
Return values
0on success
Side Effect:\n none
Precondition
none
Postcondition
none
See also
rclOpenCollection/rclReadCollection/rclCloseCollection. The query for these functions is done by the client and the query results are cached locally making it more efficient.

Definition at line 71 of file rcReadCollection.cpp.

References NULL, procApiRequest(), READ_COLLECTION_AN, and irods.pypyodbc::status.

Here is the call graph for this function:

◆ rcRmColl()

rcRmColl ( rcComm_t conn,
collInp_t rmCollInp,
int  vFlag 
)
Description:\n Delete a collection if the "forceFlag" is set. Otherwise,
the collection is moved to trash. As an option, the collection can be deleted recursively meaning the collection and its contents are deleted.
Primary User:\n client
Since
1.0
Remarks
none
Note
none
Example Usage:\n
Recursively delete the collection /myZone/home/john/mydir
int status;
collInp_t rmCollInp;
bzero (&rmCollInp, sizeof (rmCollInp));
rstrcpy (rmCollInp.collName, "/myZone/home/john/mydir", MAX_NAME_LEN);
addKeyVal (&rmCollInp->condInput, FORCE_FLAG_KW, "");
addKeyVal (&rmCollInp->condInput, RECURSIVE_OPR__KW, "");
status = rcRmColl (conn, &rmCollInp);
if (status < 0) {
.... handle the error
}
Parameters
[in]conn- A rcComm_t connection handle to the server.
[in]rmCollInp- Elements of collInp_t used :
  • char collName[MAX_NAME_LEN] - full path of the collection.
  • keyValPair_t condInput - keyword/value pair input. Valid keywords:
    RECURSIVE_OPR__KW - Recursively delete the collection and its content. This keyWd has no value.
    FORCE_FLAG_KW - delete the collection. If it is not set, the collection is moved to trash. This keyWd has no value.
    UNREG_COLL_KW - The collections and data objects in this collection is unregistered instead of deleted. i.e., physical files and directories in this collection are not deleted. This keyWd has no value.
    RMTRASH_KW - delete the trash in this path. This keyWd has no value.
    ADMIN_RMTRASH_KW - ddmin user delete other user's trash in this path. This keyWd has no value.
[in]vFlag- Verbose flag. Verbose output if set to greater than 0.
Returns
integer
Return values
0on success
Side Effect:\n none
Precondition
none
Postcondition
none
See also
none

Definition at line 79 of file rcRmColl.cpp.

References _rcRmColl(), cliGetCollOprStat(), NULL, and irods.pypyodbc::status.

Referenced by rmCollUtil(), rmdirCollUtil(), rmtrashCollUtil(), and rsRmColl().

Here is the call graph for this function:

◆ rcSyncMountedColl()

rcSyncMountedColl ( rcComm_t conn,
dataObjInp_t syncMountedCollInp 
)
Description:\n Sync the mounted structured file with the cache.
Primary User:\n client
Since
1.0
Remarks
none
Note
none
Parameters
[in]conn- A rcComm_t connection handle to the server.
[in]syncMountedCollInp- Elements of dataObjInp_t used :
  • char objPath - the path of the Mounted collection
  • char oprType
    PURGE_STRUCT_FILE_CACHE - purge the cache after the sync
    DELETE_STRUCT_FILE - delete the structured file and the cache
Returns
integer
Return values
0on success
Side Effect:\n none
Precondition
none
Postcondition
none
See also
none

Definition at line 40 of file rcSyncMountedColl.cpp.

References NULL, procApiRequest(), irods.pypyodbc::status, and SYNC_MOUNTED_COLL_AN.

Referenced by mcollUtil(), and rsSyncMountedColl().

Here is the call graph for this function: