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)  

mkdirUtil.cpp
Go to the documentation of this file.
1 
3 #include "rodsPath.h"
4 #include "rodsErrorTable.h"
5 #include "rodsLog.h"
6 #include "mkdirUtil.h"
7 #include "miscUtil.h"
8 #include "rcGlobalExtern.h"
9 
10 int
11 mkdirUtil( rcComm_t *conn, rodsArguments_t *myRodsArgs,
12  rodsPathInp_t *rodsPathInp ) {
13  int i = 0;
14  int status = 0;
15  int savedStatus = 0;
16  collInp_t collCreateInp;
17 
18 
19  if ( rodsPathInp == NULL ) {
20  return USER__NULL_INPUT_ERR;
21  }
22 
23  memset( &collCreateInp, 0, sizeof( collCreateInp ) );
24 
25  /* -p for parent */
26  if ( myRodsArgs->physicalPath == True ) {
27  addKeyVal( &collCreateInp.condInput, RECURSIVE_OPR__KW, "" );
28  }
29  for ( i = 0; i < rodsPathInp->numSrc; i++ ) {
30  rstrcpy( collCreateInp.collName, rodsPathInp->srcPath[i].outPath,
31  MAX_NAME_LEN );
32  status = rcCollCreate( conn, &collCreateInp );
33  if ( status < 0 ) {
35  "mkdirUtil: mkColl of %s error.",
36  rodsPathInp->srcPath[i].outPath );
37  savedStatus = status;
38  }
39  }
40 
41  if ( savedStatus < 0 ) {
42  return savedStatus;
43  }
44  else {
45  return status;
46  }
47 }
48 
rcComm_t
Definition: rcConnect.h:95
NULL
#define NULL
Definition: rodsDef.h:70
True
#define True
Definition: parseCommandLine.h:11
addKeyVal
int addKeyVal(keyValPair_t *condInput, const char *keyWord, const char *value)
Definition: rcMisc.cpp:789
rodsPath.h
rodsArguments_t
Definition: parseCommandLine.h:14
CollInp
Definition: dataObjInpOut.h:157
RodsPathInp
Definition: rodsPath.h:33
mkdirUtil.h
rcCollCreate
int rcCollCreate(rcComm_t *conn, collInp_t *collCreateInp)
Definition: rcCollCreate.cpp:58
mkdirUtil
int mkdirUtil(rcComm_t *conn, rodsArguments_t *myRodsArgs, rodsPathInp_t *rodsPathInp)
Definition: mkdirUtil.cpp:11
rcGlobalExtern.h
RodsPathInp::srcPath
rodsPath_t * srcPath
Definition: rodsPath.h:35
LOG_ERROR
#define LOG_ERROR
Definition: rodsLog.h:43
RECURSIVE_OPR__KW
#define RECURSIVE_OPR__KW
Definition: rodsKeyWdDef.h:66
MAX_NAME_LEN
#define MAX_NAME_LEN
Definition: rodsDef.h:61
CollInp::condInput
keyValPair_t condInput
Definition: dataObjInpOut.h:161
irods.pypyodbc.status
status
Definition: pypyodbc.py:467
rodsLog.h
rodsArguments_t::physicalPath
int physicalPath
Definition: parseCommandLine.h:70
RodsPath::outPath
char outPath[(1024+64)]
Definition: rodsPath.h:24
rodsLogError
void rodsLogError(int level, int errCode, char *formatStr,...)
Definition: rodsLog.cpp:422
RodsPathInp::numSrc
int numSrc
Definition: rodsPath.h:34
CollInp::collName
char collName[(1024+64)]
Definition: dataObjInpOut.h:158
rodsErrorTable.h
miscUtil.h
rstrcpy
char * rstrcpy(char *dest, const char *src, int maxLen)
Definition: stringOpr.cpp:51
USER__NULL_INPUT_ERR
@ USER__NULL_INPUT_ERR
Definition: rodsErrorTable.h:247