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)  

cpUtil.cpp
Go to the documentation of this file.
1 
3 #ifndef windows_platform
4 #include <sys/time.h>
5 #endif
6 #include "rodsPath.h"
7 #include "rodsErrorTable.h"
8 #include "rodsLog.h"
9 #include "miscUtil.h"
10 #include "cpUtil.h"
11 #include "rcGlobalExtern.h"
12 #include "irods_virtual_path.hpp"
13 
14 int
15 cpUtil( rcComm_t *conn, rodsEnv *myRodsEnv, rodsArguments_t *myRodsArgs,
16  rodsPathInp_t *rodsPathInp ) {
17  if ( rodsPathInp == NULL ) {
18  return USER__NULL_INPUT_ERR;
19  }
20 
21  int savedStatus = resolveRodsTarget( conn, rodsPathInp, PUT_OPR );
22  if ( savedStatus < 0 ) {
23  rodsLogError( LOG_ERROR, savedStatus,
24  "cpUtil: resolveRodsTarget error, status = %d", savedStatus );
25  return savedStatus;
26  }
27 
28  dataObjCopyInp_t dataObjCopyInp;
29  rodsRestart_t rodsRestart;
30  initCondForCp( myRodsEnv, myRodsArgs, &dataObjCopyInp, &rodsRestart );
31 
32  /* initialize the progress struct */
33  if ( gGuiProgressCB != NULL ) {
34  bzero( &conn->operProgress, sizeof( conn->operProgress ) );
35  for ( int i = 0; i < rodsPathInp->numSrc; i++ ) {
36  rodsPath_t * targPath = &rodsPathInp->targPath[i];
37  if ( targPath->objType == DATA_OBJ_T ) {
39  if ( rodsPathInp->srcPath[i].size > 0 ) {
41  rodsPathInp->srcPath[i].size;
42  }
43  }
44  else {
45  getCollSizeForProgStat( conn, rodsPathInp->srcPath[i].outPath,
46  &conn->operProgress );
47  }
48  }
49  }
50 
51  for ( int i = 0; i < rodsPathInp->numSrc; i++ ) {
52  rodsPath_t * targPath = &rodsPathInp->targPath[i];
53 
54  if ( rodsPathInp->srcPath[i].rodsObjStat != NULL &&
55  rodsPathInp->srcPath[i].rodsObjStat->specColl != NULL ) {
56  dataObjCopyInp.srcDataObjInp.specColl =
57  rodsPathInp->srcPath[i].rodsObjStat->specColl;
58  }
59 
60  int status = 0;
61  if ( targPath->objType == DATA_OBJ_T ) {
62  rmKeyVal( &dataObjCopyInp.srcDataObjInp.condInput,
64  status = cpFileUtil( conn, rodsPathInp->srcPath[i].outPath,
65  targPath->outPath, rodsPathInp->srcPath[i].size,
66  myRodsArgs, &dataObjCopyInp );
67  }
68  else if ( targPath->objType == COLL_OBJ_T ) {
69  setStateForRestart( &rodsRestart, targPath, myRodsArgs );
70  addKeyVal( &dataObjCopyInp.srcDataObjInp.condInput,
71  TRANSLATED_PATH_KW, "" );
72  status = cpCollUtil( conn, rodsPathInp->srcPath[i].outPath,
73  targPath->outPath, myRodsEnv, myRodsArgs, &dataObjCopyInp,
74  &rodsRestart );
75  if ( rodsRestart.fd > 0 && status < 0 ) {
76  close( rodsRestart.fd );
77  return status;
78  }
79  if ( dataObjCopyInp.srcDataObjInp.specColl != NULL &&
80  dataObjCopyInp.srcDataObjInp.specColl->collClass == STRUCT_FILE_COLL ) {
81  dataObjCopyInp.srcDataObjInp.specColl = NULL;
82  status = cpCollUtil( conn, rodsPathInp->srcPath[i].outPath,
83  targPath->outPath, myRodsEnv, myRodsArgs, &dataObjCopyInp,
84  &rodsRestart );
85  }
86  }
87  else {
88  /* should not be here */
90  "cpUtil: invalid cp dest objType %d for %s",
91  targPath->objType, targPath->outPath );
92  return USER_INPUT_PATH_ERR;
93  }
94  /* XXXX may need to return a global status */
95  if ( status < 0 &&
99  "cpUtil: cp error for %s, status = %d",
100  targPath->outPath, status );
101  savedStatus = status;
102  }
103  }
104 
105  if ( rodsRestart.fd > 0 ) {
106  close( rodsRestart.fd );
107  }
108  return savedStatus;
109 }
110 
111 int
112 cpFileUtil( rcComm_t *conn, char *srcPath, char *targPath, rodsLong_t srcSize,
113  rodsArguments_t *rodsArgs, dataObjCopyInp_t *dataObjCopyInp ) {
114  int status;
115  struct timeval startTime, endTime;
116 
117  if ( srcPath == NULL || targPath == NULL ) {
119  "cpFileUtil: NULL srcPath or targPath in cp" );
120  return USER__NULL_INPUT_ERR;
121  }
122 
123  if ( rodsArgs->verbose == True ) {
124  ( void ) gettimeofday( &startTime, ( struct timezone * )0 );
125  }
126 
127  if ( gGuiProgressCB != NULL ) {
128  rstrcpy( conn->operProgress.curFileName, srcPath, MAX_NAME_LEN );
129  conn->operProgress.curFileSize = srcSize;
130  conn->operProgress.curFileSizeDone = 0;
131  conn->operProgress.flag = 0;
132  gGuiProgressCB( &conn->operProgress );
133  }
134 
135  rstrcpy( dataObjCopyInp->destDataObjInp.objPath, targPath, MAX_NAME_LEN );
136  rstrcpy( dataObjCopyInp->srcDataObjInp.objPath, srcPath, MAX_NAME_LEN );
137  dataObjCopyInp->srcDataObjInp.dataSize = -1;
138 
139  status = rcDataObjCopy( conn, dataObjCopyInp );
140 
141  if ( status >= 0 ) {
142  if ( rodsArgs->verbose == True ) {
143  ( void ) gettimeofday( &endTime, ( struct timezone * )0 );
144  printTiming( conn, dataObjCopyInp->destDataObjInp.objPath,
145  conn->transStat.bytesWritten, NULL, &startTime, &endTime );
146  }
147  if ( gGuiProgressCB != NULL ) {
149  conn->operProgress.totalFileSizeDone += srcSize;
150  }
151  }
152 
153  return status;
154 }
155 
156 int
157 initCondForCp( rodsEnv *myRodsEnv, rodsArguments_t *rodsArgs,
158  dataObjCopyInp_t *dataObjCopyInp, rodsRestart_t *rodsRestart ) {
159  char *tmpStr;
160 
161  if ( dataObjCopyInp == NULL ) {
163  "initCondForCp: NULL dataObjCopyInp in cp" );
164  return USER__NULL_INPUT_ERR;
165  }
166 
167  memset( dataObjCopyInp, 0, sizeof( dataObjCopyInp_t ) );
168 
169  if ( rodsArgs == NULL ) {
170  return 0;
171  }
172 
173  if ( rodsArgs->dataType == True ) {
174  if ( rodsArgs->dataTypeString != NULL ) {
175  addKeyVal( &dataObjCopyInp->destDataObjInp.condInput, DATA_TYPE_KW,
176  rodsArgs->dataTypeString );
177  }
178  }
179 
180  if ( rodsArgs->force == True ) {
181  addKeyVal( &dataObjCopyInp->destDataObjInp.condInput, FORCE_FLAG_KW, "" );
182  }
183 
184  if ( rodsArgs->checksum == True ) {
185  addKeyVal( &dataObjCopyInp->destDataObjInp.condInput, REG_CHKSUM_KW, "" );
186  }
187 
188  if ( rodsArgs->verifyChecksum == True ) {
189  addKeyVal( &dataObjCopyInp->destDataObjInp.condInput,
190  VERIFY_CHKSUM_KW, "" );
191  }
192 
193  if ( rodsArgs->number == True ) {
194  if ( rodsArgs->numberValue == 0 ) {
195  dataObjCopyInp->destDataObjInp.numThreads = NO_THREADING;
196  }
197  else {
198  dataObjCopyInp->destDataObjInp.numThreads = rodsArgs->numberValue;
199  }
200  }
201 
202  if ( rodsArgs->physicalPath == True ) {
203  if ( rodsArgs->physicalPathString == NULL ) {
205  "initCondForCp: NULL physicalPathString error" );
206  return USER__NULL_INPUT_ERR;
207  }
208  else {
209  addKeyVal( &dataObjCopyInp->destDataObjInp.condInput, FILE_PATH_KW,
210  rodsArgs->physicalPathString );
211  }
212  }
213 
214  if ( rodsArgs->resource == True ) {
215  if ( rodsArgs->resourceString == NULL ) {
217  "initCondForCp: NULL resourceString error" );
218  return USER__NULL_INPUT_ERR;
219  }
220  else {
221  addKeyVal( &dataObjCopyInp->destDataObjInp.condInput,
222  DEST_RESC_NAME_KW, rodsArgs->resourceString );
223  }
224  }
225  else if ( myRodsEnv != NULL && strlen( myRodsEnv->rodsDefResource ) > 0 ) {
227  myRodsEnv->rodsDefResource );
228  }
229 
230  if ( rodsArgs->rbudp == True ) {
231  /* use -Q for rbudp transfer */
232  addKeyVal( &dataObjCopyInp->destDataObjInp.condInput,
233  RBUDP_TRANSFER_KW, "" );
234  addKeyVal( &dataObjCopyInp->srcDataObjInp.condInput,
235  RBUDP_TRANSFER_KW, "" );
236  }
237 
238  if ( rodsArgs->veryVerbose == True ) {
239  addKeyVal( &dataObjCopyInp->destDataObjInp.condInput, VERY_VERBOSE_KW, "" );
240  addKeyVal( &dataObjCopyInp->srcDataObjInp.condInput, VERY_VERBOSE_KW, "" );
241  }
242 
243  if ( ( tmpStr = getenv( RBUDP_SEND_RATE_KW ) ) != NULL ) {
244  addKeyVal( &dataObjCopyInp->destDataObjInp.condInput,
245  RBUDP_SEND_RATE_KW, tmpStr );
246  addKeyVal( &dataObjCopyInp->srcDataObjInp.condInput,
247  RBUDP_SEND_RATE_KW, tmpStr );
248  }
249 
250  if ( ( tmpStr = getenv( RBUDP_PACK_SIZE_KW ) ) != NULL ) {
251  addKeyVal( &dataObjCopyInp->destDataObjInp.condInput,
252  RBUDP_PACK_SIZE_KW, tmpStr );
253  addKeyVal( &dataObjCopyInp->srcDataObjInp.condInput,
254  RBUDP_PACK_SIZE_KW, tmpStr );
255  }
256 
257  memset( rodsRestart, 0, sizeof( rodsRestart_t ) );
258  if ( rodsArgs->restart == True ) {
259  int status;
260  status = openRestartFile( rodsArgs->restartFileString, rodsRestart );
261  if ( status < 0 ) {
263  "initCondForCp: openRestartFile of %s errno",
264  rodsArgs->restartFileString );
265  return status;
266  }
267  }
268 
269  //dataObjCopyInp->destDataObjInp.createMode = 0600; // seems unused, and caused https://github.com/irods/irods/issues/2085
270  dataObjCopyInp->destDataObjInp.openFlags = O_WRONLY;
271 
272  return 0;
273 }
274 
275 int
276 cpCollUtil( rcComm_t *conn, char *srcColl, char *targColl,
277  rodsEnv *myRodsEnv, rodsArguments_t *rodsArgs,
278  dataObjCopyInp_t *dataObjCopyInp, rodsRestart_t *rodsRestart ) {
279  int status = 0;
280  int savedStatus = 0;
281  char parPath[MAX_NAME_LEN], childPath[MAX_NAME_LEN];
282  collHandle_t collHandle;
283  collEnt_t collEnt;
284  char srcChildPath[MAX_NAME_LEN], targChildPath[MAX_NAME_LEN];
285  dataObjCopyInp_t childDataObjCopyInp;
286 
287  if ( srcColl == NULL || targColl == NULL ) {
289  "cpCollUtil: NULL srcColl or targColl in cp" );
290  return USER__NULL_INPUT_ERR;
291  }
292 
293  if ( rodsArgs->recursive != True ) {
295  "cpCollUtil: -r option must be used for copying %s directory",
296  srcColl );
297  return USER_INPUT_OPTION_ERR;
298  }
299 
300  // Save the current separator -- it's used in more than on place below
301  std::string separator(irods::get_virtual_path_separator());
302 
303  // Making sure that the separator has a single char
304  if (separator.size() > 1)
305  {
306  rodsLog( LOG_ERROR, "cpCollUtil: irods::get_virtual_path_separator() returned a string with more than one character.");
307  return BAD_FUNCTION_CALL;
308  }
309 
310  // Issue #3962 - find out if both the beginning of the target and source
311  // (the /<zone>/... path) match, and that if the source logical path matches
312  // completely, that the end of the matched string in the target is either the
313  // end of the path string, or a "/" leading to another collection component.
314  if (strstr(targColl, srcColl) == targColl)
315  {
316  // At this point, we know that the source path completely matches the
317  // beginning of the target path. Now look at the end of the target path:
318  size_t srclen = strlen(srcColl);
319 
320  if (srclen == strlen(targColl) || targColl[srclen] == separator[0]) {
321  // We're here because the source and target paths are identical (proved
322  // by the fact that both string lengths are the same), or because the
323  // character in the target path just beyond the end of the strstr() comparison,
324  // is a separator ("/").
325  rodsLog(LOG_ERROR, "cpCollUtil: cannot copy collection %s into itself", srcColl);
327  }
328  }
329 
330  status = rclOpenCollection( conn, srcColl, 0, &collHandle );
331  if ( status < 0 ) {
333  "cpCollUtil: rclOpenCollection of %s error. status = %d",
334  srcColl, status );
335  return status;
336  }
337  while ( ( status = rclReadCollection( conn, &collHandle, &collEnt ) ) >= 0 ) {
338  if ( collEnt.objType == DATA_OBJ_T ) {
339  snprintf( srcChildPath, MAX_NAME_LEN, "%s/%s",
340  collEnt.collName, collEnt.dataName );
341  snprintf( targChildPath, MAX_NAME_LEN, "%s/%s",
342  targColl, collEnt.dataName );
343 
344  int status = chkStateForResume( conn, rodsRestart, targChildPath,
345  rodsArgs, DATA_OBJ_T, &dataObjCopyInp->destDataObjInp.condInput,
346  1 );
347 
348  if ( status < 0 ) {
349  /* restart failed */
350  break;
351  }
352  else if ( status == 0 ) {
353  continue;
354  }
355 
356  status = cpFileUtil( conn, srcChildPath, targChildPath,
357  collEnt.dataSize, rodsArgs, dataObjCopyInp );
358 
359  if ( status < 0 ) {
361  "getCollUtil: getDataObjUtil failed for %s. status = %d",
362  srcChildPath, status );
363  savedStatus = status;
364  if ( rodsRestart->fd > 0 ) {
365  break;
366  }
367  }
368  else {
369  status = procAndWriteRestartFile( rodsRestart, targChildPath );
370  if ( status < 0 ) {
372  "getCollUtil: procAndWriteRestartFile failed for %s. status = %d",
373  targChildPath, status );
374  savedStatus = status;
375  }
376  }
377  }
378  else if ( collEnt.objType == COLL_OBJ_T ) {
379  if ( ( status = splitPathByKey(
380  collEnt.collName, parPath, MAX_NAME_LEN, childPath, MAX_NAME_LEN, separator[0] ) ) < 0 ) {
382  "cpCollUtil:: splitPathByKey for %s error, status = %d",
383  collEnt.collName, status );
384  return status;
385  }
386 
387  snprintf( targChildPath, MAX_NAME_LEN, "%s/%s",
388  targColl, childPath );
389  mkCollR( conn, targColl, targChildPath );
390 
391  if ( rodsArgs->verbose == True ) {
392  fprintf( stdout, "C- %s:\n", targChildPath );
393  }
394 
395  /* the child is a spec coll. need to drill down */
396  childDataObjCopyInp = *dataObjCopyInp;
397  if ( collEnt.specColl.collClass != NO_SPEC_COLL )
398  childDataObjCopyInp.srcDataObjInp.specColl =
399  &collEnt.specColl;
400  int status = cpCollUtil( conn, collEnt.collName,
401  targChildPath, myRodsEnv, rodsArgs, &childDataObjCopyInp,
402  rodsRestart );
403 
404  if ( status < 0 && status != CAT_NO_ROWS_FOUND &&
406  savedStatus = status;
407  }
408  }
409  }
410  rclCloseCollection( &collHandle );
411 
412  if ( savedStatus < 0 ) {
413  return savedStatus;
414  }
415  else if ( status == CAT_NO_ROWS_FOUND ||
417  return 0;
418  }
419  else {
420  return status;
421  }
422 }
423 
RBUDP_SEND_RATE_KW
#define RBUDP_SEND_RATE_KW
Definition: rodsKeyWdDef.h:78
rodsArguments_t::restartFileString
char * restartFileString
Definition: parseCommandLine.h:117
rodsLog
void rodsLog(int level, const char *formatStr,...)
Definition: rodsLog.cpp:86
DataObjInp::objPath
char objPath[(1024+64)]
Definition: dataObjInpOut.h:66
rcComm_t
Definition: rcConnect.h:95
NULL
#define NULL
Definition: rodsDef.h:70
RodsPath::rodsObjStat
rodsObjStat_t * rodsObjStat
Definition: rodsPath.h:27
True
#define True
Definition: parseCommandLine.h:11
DataObjCopyInp::srcDataObjInp
dataObjInp_t srcDataObjInp
Definition: dataObjCopy.h:26
addKeyVal
int addKeyVal(keyValPair_t *condInput, const char *keyWord, const char *value)
Definition: rcMisc.cpp:789
rodsPath.h
rclOpenCollection
int rclOpenCollection(rcComm_t *conn, char *collection, int flag, collHandle_t *collHandle)
Definition: miscUtil.cpp:1057
DataObjCopyInp
Definition: dataObjCopy.h:25
DataObjInp::openFlags
int openFlags
Definition: dataObjInpOut.h:68
OperProgress::flag
int flag
Definition: guiProgressCallback.h:9
rodsArguments_t
Definition: parseCommandLine.h:14
DataObjInp::specColl
specColl_t * specColl
Definition: dataObjInpOut.h:73
rodsArguments_t::rbudp
int rbudp
Definition: parseCommandLine.h:83
procAndWriteRestartFile
int procAndWriteRestartFile(rodsRestart_t *rodsRestart, char *donePath)
Definition: rcMisc.cpp:2700
RBUDP_TRANSFER_KW
#define RBUDP_TRANSFER_KW
Definition: rodsKeyWdDef.h:76
RodsPathInp
Definition: rodsPath.h:33
collHandle_t
Definition: miscUtil.h:97
DataObjInp::dataSize
rodsLong_t dataSize
Definition: dataObjInpOut.h:70
rodsArguments_t::verbose
int verbose
Definition: parseCommandLine.h:107
OperProgress::curFileSize
rodsLong_t curFileSize
Definition: guiProgressCallback.h:15
CollEnt::collName
char * collName
Definition: miscUtil.h:119
SYS_SPEC_COLL_OBJ_NOT_EXIST
@ SYS_SPEC_COLL_OBJ_NOT_EXIST
Definition: rodsErrorTable.h:123
rodsArguments_t::dataTypeString
char * dataTypeString
Definition: parseCommandLine.h:55
OperProgress::curFileSizeDone
rodsLong_t curFileSizeDone
Definition: guiProgressCallback.h:16
mkCollR
int mkCollR(rcComm_t *conn, char *startColl, char *destColl)
Definition: miscUtil.cpp:51
resolveRodsTarget
int resolveRodsTarget(rcComm_t *conn, rodsPathInp_t *rodsPathInp, int oprType)
Definition: miscUtil.cpp:2342
CollEnt::dataSize
rodsLong_t dataSize
Definition: miscUtil.h:118
OperProgress::totalFileSize
rodsLong_t totalFileSize
Definition: guiProgressCallback.h:11
PUT_OPR
#define PUT_OPR
Definition: dataObjInpOut.h:167
OperProgress::totalFileSizeDone
rodsLong_t totalFileSizeDone
Definition: guiProgressCallback.h:13
cpUtil
int cpUtil(rcComm_t *conn, rodsEnv *myRodsEnv, rodsArguments_t *myRodsArgs, rodsPathInp_t *rodsPathInp)
Definition: cpUtil.cpp:15
cpUtil.h
gGuiProgressCB
guiProgressCallback gGuiProgressCB
Definition: rcGlobal.cpp:207
rodsArguments_t::physicalPathString
char * physicalPathString
Definition: parseCommandLine.h:71
rodsArguments_t::resource
int resource
Definition: parseCommandLine.h:86
STRUCT_FILE_COLL
@ STRUCT_FILE_COLL
Definition: objInfo.h:47
rcGlobalExtern.h
RodsPathInp::srcPath
rodsPath_t * srcPath
Definition: rodsPath.h:35
LOG_ERROR
#define LOG_ERROR
Definition: rodsLog.h:43
RodsPath::objType
objType_t objType
Definition: rodsPath.h:19
NO_THREADING
#define NO_THREADING
Definition: rodsDef.h:100
OperProgress::curFileName
char curFileName[MAX_NAME_LEN]
Definition: guiProgressCallback.h:14
DATA_TYPE_KW
#define DATA_TYPE_KW
Definition: rodsKeyWdDef.h:23
transferStat_t::bytesWritten
rodsLong_t bytesWritten
Definition: objInfo.h:294
OperProgress::totalNumFilesDone
rodsLong_t totalNumFilesDone
Definition: guiProgressCallback.h:12
REG_CHKSUM_KW
#define REG_CHKSUM_KW
Definition: rodsKeyWdDef.h:15
COLL_OBJ_T
@ COLL_OBJ_T
Definition: rodsType.h:39
RodsPathInp::targPath
rodsPath_t * targPath
Definition: rodsPath.h:37
rodsArguments_t::checksum
int checksum
Definition: parseCommandLine.h:52
DEST_RESC_NAME_KW
#define DEST_RESC_NAME_KW
Definition: rodsKeyWdDef.h:20
rodsArguments_t::verifyChecksum
int verifyChecksum
Definition: parseCommandLine.h:53
rclCloseCollection
int rclCloseCollection(collHandle_t *collHandle)
Definition: miscUtil.cpp:1354
irods::get_virtual_path_separator
std::string get_virtual_path_separator()
Definition: irods_virtual_path.cpp:11
VERY_VERBOSE_KW
#define VERY_VERBOSE_KW
Definition: rodsKeyWdDef.h:77
setStateForRestart
int setStateForRestart(rodsRestart_t *rodsRestart, rodsPath_t *targPath, rodsArguments_t *rodsArgs)
Definition: rcMisc.cpp:2714
CollEnt
Definition: miscUtil.h:113
OperProgress::totalNumFiles
rodsLong_t totalNumFiles
Definition: guiProgressCallback.h:10
rodsArguments_t::veryVerbose
int veryVerbose
Definition: parseCommandLine.h:108
CollEnt::specColl
specColl_t specColl
Definition: miscUtil.h:130
MAX_NAME_LEN
#define MAX_NAME_LEN
Definition: rodsDef.h:61
RBUDP_PACK_SIZE_KW
#define RBUDP_PACK_SIZE_KW
Definition: rodsKeyWdDef.h:79
rmKeyVal
int rmKeyVal(keyValPair_t *condInput, const char *keyWord)
Definition: rcMisc.cpp:710
RodsPath::size
rodsLong_t size
Definition: rodsPath.h:21
cpCollUtil
int cpCollUtil(rcComm_t *conn, char *srcColl, char *targColl, rodsEnv *myRodsEnv, rodsArguments_t *rodsArgs, dataObjCopyInp_t *dataObjCopyInp, rodsRestart_t *rodsRestart)
Definition: cpUtil.cpp:276
getCollSizeForProgStat
int getCollSizeForProgStat(rcComm_t *conn, char *srcColl, operProgress_t *operProgress)
Definition: miscUtil.cpp:1920
irods.pypyodbc.status
status
Definition: pypyodbc.py:467
NO_SPEC_COLL
@ NO_SPEC_COLL
Definition: objInfo.h:46
TRANSLATED_PATH_KW
#define TRANSLATED_PATH_KW
Definition: rodsKeyWdDef.h:97
rcComm_t::operProgress
operProgress_t operProgress
Definition: rcConnect.h:119
splitPathByKey
int splitPathByKey(const char *srcPath, char *dir, size_t maxDirLen, char *file, size_t maxFileLen, char key)
Definition: stringOpr.cpp:222
rodsLog.h
cpFileUtil
int cpFileUtil(rcComm_t *conn, char *srcPath, char *targPath, rodsLong_t srcSize, rodsArguments_t *rodsArgs, dataObjCopyInp_t *dataObjCopyInp)
Definition: cpUtil.cpp:112
rodsArguments_t::resourceString
char * resourceString
Definition: parseCommandLine.h:87
rodsRestart_t
Definition: rodsDef.h:317
rodsArguments_t::force
int force
Definition: parseCommandLine.h:38
DATA_OBJ_T
@ DATA_OBJ_T
Definition: rodsType.h:38
rodsArguments_t::physicalPath
int physicalPath
Definition: parseCommandLine.h:70
CollEnt::dataName
char * dataName
Definition: miscUtil.h:120
rcDataObjCopy
int rcDataObjCopy(rcComm_t *conn, dataObjCopyInp_t *dataObjCopyInp)
Definition: rcDataObjCopy.cpp:85
rodsEnv::rodsDefResource
char rodsDefResource[64]
Definition: getRodsEnv.h:17
RodsPath::outPath
char outPath[(1024+64)]
Definition: rodsPath.h:24
DataObjCopyInp::destDataObjInp
dataObjInp_t destDataObjInp
Definition: dataObjCopy.h:27
printTiming
int printTiming(rcComm_t *conn, char *objPath, rodsLong_t fileSize, char *localFile, struct timeval *startTime, struct timeval *endTime)
Definition: miscUtil.cpp:396
rodsRestart_t::fd
int fd
Definition: rodsDef.h:319
rodsArguments_t::recursive
int recursive
Definition: parseCommandLine.h:85
FORCE_FLAG_KW
#define FORCE_FLAG_KW
Definition: rodsKeyWdDef.h:13
irods_virtual_path.hpp
CAT_NO_ROWS_FOUND
@ CAT_NO_ROWS_FOUND
Definition: rodsErrorTable.h:423
VERIFY_CHKSUM_KW
#define VERIFY_CHKSUM_KW
Definition: rodsKeyWdDef.h:16
USER_INPUT_OPTION_ERR
@ USER_INPUT_OPTION_ERR
Definition: rodsErrorTable.h:249
openRestartFile
int openRestartFile(char *restartFile, rodsRestart_t *rodsRestart)
Definition: rcMisc.cpp:2552
rodsLogError
void rodsLogError(int level, int errCode, char *formatStr,...)
Definition: rodsLog.cpp:422
RodsPathInp::numSrc
int numSrc
Definition: rodsPath.h:34
initCondForCp
int initCondForCp(rodsEnv *myRodsEnv, rodsArguments_t *rodsArgs, dataObjCopyInp_t *dataObjCopyInp, rodsRestart_t *rodsRestart)
Definition: cpUtil.cpp:157
chkStateForResume
int chkStateForResume(rcComm_t *conn, rodsRestart_t *rodsRestart, char *targPath, rodsArguments_t *rodsArgs, objType_t objType, keyValPair_t *condInput, int deleteFlag)
Definition: putUtil.cpp:34
rcComm_t::transStat
transferStat_t transStat
Definition: rcConnect.h:108
CollEnt::objType
objType_t objType
Definition: miscUtil.h:114
rclReadCollection
int rclReadCollection(rcComm_t *conn, collHandle_t *collHandle, collEnt_t *collEnt)
Definition: miscUtil.cpp:1108
rodsErrorTable.h
rodsObjStat::specColl
specColl_t * specColl
Definition: objStat.h:18
RodsPath
Definition: rodsPath.h:18
miscUtil.h
rodsArguments_t::numberValue
int numberValue
Definition: parseCommandLine.h:69
rstrcpy
char * rstrcpy(char *dest, const char *src, int maxLen)
Definition: stringOpr.cpp:51
BAD_FUNCTION_CALL
@ BAD_FUNCTION_CALL
Definition: rodsErrorTable.h:772
DataObjInp::condInput
keyValPair_t condInput
Definition: dataObjInpOut.h:74
rodsEnv
Definition: getRodsEnv.h:8
FILE_PATH_KW
#define FILE_PATH_KW
Definition: rodsKeyWdDef.h:28
USER_INPUT_PATH_ERR
@ USER_INPUT_PATH_ERR
Definition: rodsErrorTable.h:248
SAME_SRC_DEST_PATHS_ERR
@ SAME_SRC_DEST_PATHS_ERR
Definition: rodsErrorTable.h:260
rodsArguments_t::restart
int restart
Definition: parseCommandLine.h:116
rodsArguments_t::dataType
int dataType
Definition: parseCommandLine.h:54
DataObjInp::numThreads
int numThreads
Definition: dataObjInpOut.h:71
rodsLong_t
long long rodsLong_t
Definition: rodsType.h:32
rodsArguments_t::number
int number
Definition: parseCommandLine.h:68
SpecColl::collClass
specCollClass_t collClass
Definition: objInfo.h:77
USER__NULL_INPUT_ERR
@ USER__NULL_INPUT_ERR
Definition: rodsErrorTable.h:247