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)  

rsQuerySpecColl.cpp
Go to the documentation of this file.
1 
3 /* rsQuerySpecColl.c
4  */
5 
6 #include "querySpecColl.h"
7 #include "rcMisc.h"
8 #include "fileOpendir.h"
9 #include "fileReaddir.h"
10 #include "fileClosedir.h"
11 #include "objMetaOpr.hpp"
12 #include "specColl.hpp"
13 #include "dataObjClose.h"
14 #include "subStructFileOpendir.h"
15 #include "subStructFileReaddir.h"
16 #include "subStructFileClosedir.h"
17 #include "fileStat.h"
18 #include "genQuery.h"
19 #include "rsGlobalExtern.hpp"
20 #include "rcGlobalExtern.h"
21 #include "rsQuerySpecColl.hpp"
23 #include "rsDataObjClose.hpp"
24 #include "rsFileReaddir.hpp"
26 #include "rsFileClosedir.hpp"
28 #include "rsFileOpendir.hpp"
29 
32 #include "irods_stacktrace.hpp"
34 
35 
36 int
37 rsQuerySpecColl( rsComm_t *rsComm, dataObjInp_t *dataObjInp,
38  genQueryOut_t **genQueryOut ) {
39 
40  int specCollInx;
41  int status;
42  int continueFlag; /* continue query */
43  int remoteFlag;
45  remoteFlag = getAndConnRcatHost(
46  rsComm,
47  SLAVE_RCAT,
48  ( const char* )dataObjInp->objPath,
49  &rodsServerHost );
50 
51  if ( remoteFlag < 0 ) {
52  return remoteFlag;
53  }
54  else if ( remoteFlag == REMOTE_HOST ) {
55  status = rcQuerySpecColl( rodsServerHost->conn, dataObjInp,
56  genQueryOut );
57  return status;
58  }
59 
60  // =-=-=-=-=-=-=-
61  // working on the "home zone", determine if we need to redirect to a different
62  // server in this zone for this operation. if there is a RESC_HIER_STR_KW then
63  // we know that the redirection decision has already been made
64  std::string hier;
65  char* hier_kw = getValByKey( &dataObjInp->condInput, RESC_HIER_STR_KW );
66  if ( NULL == hier_kw ) {
68  dataObjInp, hier );
69  if ( !ret.ok() ) {
70  std::stringstream msg;
71  msg << "failed for [";
72  msg << dataObjInp->objPath << "]";
73  irods::log( PASSMSG( msg.str(), ret ) );
74  return ret.code();
75  }
76 
77  // =-=-=-=-=-=-=-
78  // we resolved the redirect and have a host, set the hier str for subsequent
79  // api calls, etc.
80  addKeyVal( &dataObjInp->condInput, RESC_HIER_STR_KW, hier.c_str() );
81 
82  }
83  else {
84  hier = hier_kw;
85 
86  }
87 
88  if ( ( specCollInx = dataObjInp->openFlags ) <= 0 ) {
89  specCollInx = openSpecColl( rsComm, dataObjInp, -1 );
90  if ( specCollInx < 0 ) {
92  "rsQuerySpecColl: openSpecColl error for %s, status = %d",
93  dataObjInp->objPath, specCollInx );
94  return specCollInx;
95  }
96  continueFlag = 0;
97  }
98  else {
99  continueFlag = 1;
100  }
101 
102  initOutForQuerySpecColl( genQueryOut );
103 
104  status = _rsQuerySpecColl( rsComm, specCollInx, dataObjInp,
105  *genQueryOut, continueFlag );
106 
107  if ( status < 0 ) {
108  freeGenQueryOut( genQueryOut );
109  }
110  return status;
111 }
112 
113 int
114 openSpecColl( rsComm_t *rsComm, dataObjInp_t *dataObjInp, int parentInx ) {
115  int specCollInx;
116  dataObjInfo_t *dataObjInfo = NULL;
117  int status;
118  int l3descInx;
119 
120  status = resolvePathInSpecColl( rsComm, dataObjInp->objPath,
121  //READ_COLL_PERM, 0, &dataObjInfo);
122  UNKNOWN_COLL_PERM, 0, &dataObjInfo );
123 
124  if ( status < 0 || NULL == dataObjInfo ) { // JMC cppcheck - nullptr
126  "rsQuerySpecColl: resolveSpecColl error for %s, status = %d",
127  dataObjInp->objPath, status );
128  return status;
129  }
130 
131  if ( dataObjInfo->specColl->collClass == LINKED_COLL ) {
133  "rsQuerySpecColl: %s is a linked collection",
134  dataObjInp->objPath );
136  }
137 
138  char* resc_hier = getValByKey( &dataObjInp->condInput, RESC_HIER_STR_KW );
139  if ( resc_hier ) {
140  strncpy( dataObjInfo->rescHier, resc_hier, MAX_NAME_LEN );
141  irods::error ret = resc_mgr.hier_to_leaf_id(resc_hier,dataObjInfo->rescId);
142  if( !ret.ok() ) {
143  irods::log(PASS(ret));
144  }
145  }
146 
147  l3descInx = l3Opendir( rsComm, dataObjInfo );
148 
149  if ( l3descInx < 0 ) {
151  "openSpecColl: specCollOpendir error for %s, status = %d",
152  dataObjInp->objPath, l3descInx );
153  return l3descInx;
154  }
155  specCollInx = allocSpecCollDesc();
156  if ( specCollInx < 0 ) {
157  freeDataObjInfo( dataObjInfo );
158  return specCollInx;
159  }
160  SpecCollDesc[specCollInx].l3descInx = l3descInx;
161  SpecCollDesc[specCollInx].dataObjInfo = dataObjInfo;
162  SpecCollDesc[specCollInx].parentInx = parentInx;
163 
164  return specCollInx;
165 }
166 
167 int
169  genQueryOut_t *myGenQueryOut;
170 
171  /* will do collection, dataName, createTime, modifyTime, objSize */
172 
173  myGenQueryOut = *genQueryOut =
174  ( genQueryOut_t * ) malloc( sizeof( genQueryOut_t ) );
175 
176  memset( myGenQueryOut, 0, sizeof( genQueryOut_t ) );
177 
178  myGenQueryOut->attriCnt = 5;
179 
180  myGenQueryOut->sqlResult[0].attriInx = COL_COLL_NAME;
181  myGenQueryOut->sqlResult[0].len = MAX_NAME_LEN;
182  myGenQueryOut->sqlResult[0].value =
183  ( char* )malloc( MAX_NAME_LEN * MAX_SPEC_COLL_ROW );
184  memset( myGenQueryOut->sqlResult[0].value, 0,
186  myGenQueryOut->sqlResult[1].attriInx = COL_DATA_NAME;
187  myGenQueryOut->sqlResult[1].len = MAX_NAME_LEN;
188  myGenQueryOut->sqlResult[1].value =
189  ( char* )malloc( MAX_NAME_LEN * MAX_SPEC_COLL_ROW );
190  memset( myGenQueryOut->sqlResult[1].value, 0,
192  myGenQueryOut->sqlResult[2].attriInx = COL_D_CREATE_TIME;
193  myGenQueryOut->sqlResult[2].len = NAME_LEN;
194  myGenQueryOut->sqlResult[2].value =
195  ( char* )malloc( NAME_LEN * MAX_SPEC_COLL_ROW );
196  memset( myGenQueryOut->sqlResult[2].value, 0,
198  myGenQueryOut->sqlResult[3].attriInx = COL_D_MODIFY_TIME;
199  myGenQueryOut->sqlResult[3].len = NAME_LEN;
200  myGenQueryOut->sqlResult[3].value =
201  ( char* )malloc( NAME_LEN * MAX_SPEC_COLL_ROW );
202  memset( myGenQueryOut->sqlResult[3].value, 0,
204  myGenQueryOut->sqlResult[4].attriInx = COL_DATA_SIZE;
205  myGenQueryOut->sqlResult[4].len = NAME_LEN;
206  myGenQueryOut->sqlResult[4].value =
207  ( char* )malloc( NAME_LEN * MAX_SPEC_COLL_ROW );
208  memset( myGenQueryOut->sqlResult[4].value, 0,
210 
211  myGenQueryOut->continueInx = -1;
212 
213  return 0;
214 }
215 
216 int
217 _rsQuerySpecColl( rsComm_t *rsComm, int specCollInx,
218  dataObjInp_t *dataObjInp, genQueryOut_t *genQueryOut, int continueFlag ) {
219  int status = 0;
221  dataObjInfo_t *dataObjInfo;
222  int rowCnt;
223  objType_t selObjType;
224  char *tmpStr;
225  dataObjInp_t newDataObjInp;
226  int recurFlag;
227 
228  if ( SpecCollDesc[specCollInx].inuseFlag != FD_INUSE ) {
230  "_rsQuerySpecColl: Input specCollInx %d not active", specCollInx );
231  return BAD_INPUT_DESC_INDEX;
232  }
233 
234  if ( ( tmpStr = getValByKey( &dataObjInp->condInput, SEL_OBJ_TYPE_KW ) ) !=
235  NULL ) {
236  if ( strcmp( tmpStr, "dataObj" ) == 0 ) {
237  selObjType = DATA_OBJ_T;
238  }
239  else {
240  selObjType = COLL_OBJ_T;
241  }
242  }
243  else {
244  selObjType = UNKNOWN_OBJ_T;
245  }
246 
247  if ( getValByKey( &dataObjInp->condInput, RECURSIVE_OPR__KW ) != NULL ) {
248  recurFlag = 1;
249  }
250  else {
251  recurFlag = 0;
252  }
253 
254  dataObjInfo = SpecCollDesc[specCollInx].dataObjInfo;
255 
256  while ( genQueryOut->rowCnt < MAX_SPEC_COLL_ROW ) {
257  dataObjInfo_t myDataObjInfo;
258  rodsDirent_t myRodsDirent;
259 
260  status = specCollReaddir( rsComm, specCollInx, &rodsDirent );
261 
262  if ( status < 0 ) {
263  break;
264  }
265 
266  myRodsDirent = *rodsDirent;
267  free( rodsDirent );
268 
269  if ( strcmp( myRodsDirent.d_name, "." ) == 0 ||
270  strcmp( myRodsDirent.d_name, ".." ) == 0 ) {
271  continue;
272  }
273 
274  myDataObjInfo = *dataObjInfo;
275 
276  snprintf( myDataObjInfo.subPath, MAX_NAME_LEN, "%s/%s",
277  dataObjInfo->subPath, myRodsDirent.d_name );
278  snprintf( myDataObjInfo.filePath, MAX_NAME_LEN, "%s/%s",
279  dataObjInfo->filePath, myRodsDirent.d_name );
280 
281  rodsStat_t *fileStatOut = NULL;
282  status = l3Stat( rsComm, &myDataObjInfo, &fileStatOut );
283  if ( status < 0 ) {
285  "_rsQuerySpecColl: l3Stat for %s error, status = %d",
286  myDataObjInfo.filePath, status );
287  /* XXXXX need clean up */
288  return status;
289  }
290 
291  if ( ( fileStatOut->st_mode & S_IFREG ) != 0 ) { /* a file */
292  if ( selObjType == COLL_OBJ_T ) {
293  free( fileStatOut );
294  continue;
295  }
296  rowCnt = genQueryOut->rowCnt;
297  rstrcpy( &genQueryOut->sqlResult[0].value[MAX_NAME_LEN * rowCnt],
298  dataObjInfo->subPath, MAX_NAME_LEN );
299  rstrcpy( &genQueryOut->sqlResult[1].value[MAX_NAME_LEN * rowCnt],
300  myRodsDirent.d_name, MAX_NAME_LEN );
301  snprintf( &genQueryOut->sqlResult[2].value[NAME_LEN * rowCnt],
302  NAME_LEN, "%d", fileStatOut->st_ctim );
303  snprintf( &genQueryOut->sqlResult[3].value[NAME_LEN * rowCnt],
304  NAME_LEN, "%d", fileStatOut->st_mtim );
305  snprintf( &genQueryOut->sqlResult[4].value[NAME_LEN * rowCnt],
306  NAME_LEN, "%lld", fileStatOut->st_size );
307 
308  free( fileStatOut );
309 
310  genQueryOut->rowCnt++;
311 
312  }
313  else {
314  if ( selObjType != DATA_OBJ_T ) {
315  rowCnt = genQueryOut->rowCnt;
316  rstrcpy( &genQueryOut->sqlResult[0].value[MAX_NAME_LEN * rowCnt],
317  myDataObjInfo.subPath, MAX_NAME_LEN );
318  snprintf( &genQueryOut->sqlResult[2].value[NAME_LEN * rowCnt],
319  NAME_LEN, "%d", fileStatOut->st_ctim );
320  snprintf( &genQueryOut->sqlResult[3].value[NAME_LEN * rowCnt],
321  NAME_LEN, "%d", fileStatOut->st_mtim );
322  snprintf( &genQueryOut->sqlResult[4].value[NAME_LEN * rowCnt],
323  NAME_LEN, "%lld", fileStatOut->st_size );
324  genQueryOut->rowCnt++;
325  }
326 
327  free( fileStatOut );
328 
329  if ( recurFlag > 0 ) {
330  /* need to drill down */
331  int newSpecCollInx;
332  newDataObjInp = *dataObjInp;
333  rstrcpy( newDataObjInp.objPath, dataObjInfo->subPath,
334  MAX_NAME_LEN );
335  newSpecCollInx =
336  openSpecColl( rsComm, &newDataObjInp, specCollInx );
337  if ( newSpecCollInx < 0 ) {
339  "_rsQuerySpecColl: openSpecColl err for %s, stat = %d",
340  newDataObjInp.objPath, newSpecCollInx );
341  status = newSpecCollInx;
342  break;
343  }
344  status = _rsQuerySpecColl( rsComm, newSpecCollInx,
345  &newDataObjInp, genQueryOut, 0 );
346  if ( status < 0 ) {
347  break;
348  }
349  }
350  }
351  } // while
352 
353  if ( status == EOF || status == CAT_NO_ROWS_FOUND ) {
354  status = 0;
355  }
356 
357  if ( genQueryOut->rowCnt < MAX_SPEC_COLL_ROW ) {
358  int parentInx;
359  /* get to the end or error */
360  specCollClosedir( rsComm, specCollInx );
361  parentInx = SpecCollDesc[specCollInx].parentInx;
362  freeSpecCollDesc( specCollInx );
363  if ( status >= 0 && recurFlag && continueFlag && parentInx > 0 ) {
364  newDataObjInp = *dataObjInp;
365  rstrcpy( newDataObjInp.objPath,
367  status = _rsQuerySpecColl( rsComm, parentInx,
368  &newDataObjInp, genQueryOut, continueFlag );
369  }
370  else {
371  /* no more */
372  genQueryOut->continueInx = -1;
373  }
374  if ( status == EOF || status == CAT_NO_ROWS_FOUND ) {
375  status = 0;
376  }
377  }
378  else {
379  /* more to come */
380  if ( genQueryOut->continueInx < 0 ) {
381  /* if one does not already exist */
382  genQueryOut->continueInx = specCollInx;
383  }
384  }
385 
386  if ( status >= 0 && genQueryOut->rowCnt == 0 ) {
388  }
389 
390  return status;
391 }
392 
393 int
394 specCollReaddir( rsComm_t *rsComm, int specCollInx, rodsDirent_t **rodsDirent ) {
395  fileReaddirInp_t fileReaddirInp;
396  specColl_t *specColl;
397  int status;
398  dataObjInfo_t *dataObjInfo = SpecCollDesc[specCollInx].dataObjInfo;
399 
400  if ( dataObjInfo == NULL || ( specColl = dataObjInfo->specColl ) == NULL ) {
402  }
403 
404  // =-=-=-=-=-=-=-
405  // get the resc location of the hier leaf
406  std::string location;
407  irods::error ret = irods::get_loc_for_hier_string( dataObjInfo->rescHier, location );
408  if ( !ret.ok() ) {
409  irods::log( PASSMSG( "specCollReaddir - failed in get_loc_for_hier_string", ret ) );
410  return -1;
411  }
412 
413 
414  if ( getStructFileType( dataObjInfo->specColl ) >= 0 ) {
415  subStructFileFdOprInp_t subStructFileReaddirInp;
416  memset( &subStructFileReaddirInp, 0, sizeof( subStructFileReaddirInp ) );
417  subStructFileReaddirInp.type = dataObjInfo->specColl->type;
418  subStructFileReaddirInp.fd = SpecCollDesc[specCollInx].l3descInx;
419  rstrcpy( subStructFileReaddirInp.addr.hostAddr,
420  location.c_str(), NAME_LEN );
421  rstrcpy( subStructFileReaddirInp.resc_hier,
422  dataObjInfo->rescHier,
423  MAX_NAME_LEN );
424  status = rsSubStructFileReaddir( rsComm, &subStructFileReaddirInp,
425  rodsDirent );
426  }
427  else if ( specColl->collClass == MOUNTED_COLL ) {
428  fileReaddirInp.fileInx = SpecCollDesc[specCollInx].l3descInx;
429  status = rsFileReaddir( rsComm, &fileReaddirInp, rodsDirent );
430  }
431  else {
433  "specCollReaddir: Unknown specColl collClass = %d",
434  specColl->collClass );
436  }
437 
438  return status;
439 }
440 
441 int
442 specCollClosedir( rsComm_t *rsComm, int specCollInx ) {
443  fileClosedirInp_t fileClosedirInp;
444  specColl_t *specColl;
445  int status;
446  dataObjInfo_t *dataObjInfo = SpecCollDesc[specCollInx].dataObjInfo;
447 
448  if ( dataObjInfo == NULL || ( specColl = dataObjInfo->specColl ) == NULL ) {
450  }
451 
452  // =-=-=-=-=-=-=-
453  // get the resc location of the hier leaf
454  std::string location;
455  irods::error ret = irods::get_loc_for_hier_string( dataObjInfo->rescHier, location );
456  if ( !ret.ok() ) {
457  irods::log( PASSMSG( "specCollClosedir - failed in get_loc_for_hier_string", ret ) );
458  return -1;
459  }
460 
461  if ( getStructFileType( dataObjInfo->specColl ) >= 0 ) {
462  subStructFileFdOprInp_t subStructFileClosedirInp;
463  memset( &subStructFileClosedirInp, 0, sizeof( subStructFileClosedirInp ) );
464  subStructFileClosedirInp.type = dataObjInfo->specColl->type;
465  subStructFileClosedirInp.fd = SpecCollDesc[specCollInx].l3descInx;
466  rstrcpy( subStructFileClosedirInp.addr.hostAddr,
467  location.c_str(),
468  NAME_LEN );
469  rstrcpy( subStructFileClosedirInp.resc_hier,
470  dataObjInfo->rescHier,
471  MAX_NAME_LEN );
472  status = rsSubStructFileClosedir( rsComm, &subStructFileClosedirInp );
473  }
474  else if ( specColl->collClass == MOUNTED_COLL ) {
475  fileClosedirInp.fileInx = SpecCollDesc[specCollInx].l3descInx;
476  status = rsFileClosedir( rsComm, &fileClosedirInp );
477  }
478  else {
480  "specCollClosedir: Unknown specColl collClass = %d",
481  specColl->collClass );
483  }
484 
485  return status;
486 }
487 
488 int
489 l3Opendir( rsComm_t *rsComm, dataObjInfo_t *dataObjInfo ) {
490  fileOpendirInp_t fileOpendirInp;
491  int status;
492 
493  if ( dataObjInfo == NULL ) {
495  }
496 
497  // =-=-=-=-=-=-=-
498  // get the resc location of the hier leaf
499  std::string location;
500  irods::error ret = irods::get_loc_for_hier_string( dataObjInfo->rescHier, location );
501  if ( !ret.ok() ) {
502  irods::log( PASSMSG( "l3Opendir - failed in get_loc_for_hier_string", ret ) );
503  return -1;
504  }
505 
506  if ( getStructFileType( dataObjInfo->specColl ) >= 0 ) {
507  subFile_t subStructFileOpendirInp;
508  status = 0;
509 
510 
511  memset( &subStructFileOpendirInp, 0, sizeof( subStructFileOpendirInp ) );
512  rstrcpy( subStructFileOpendirInp.subFilePath, dataObjInfo->subPath, MAX_NAME_LEN );
513  //rstrcpy( subStructFileOpendirInp.addr.hostAddr, dataObjInfo->rescInfo->rescLoc, NAME_LEN );
514  rstrcpy( subStructFileOpendirInp.addr.hostAddr, location.c_str(), NAME_LEN );
515  subStructFileOpendirInp.specColl = dataObjInfo->specColl;
516  status = rsSubStructFileOpendir( rsComm, &subStructFileOpendirInp );
517  }
518  else {
519  memset( &fileOpendirInp, 0, sizeof( fileOpendirInp ) );
520  rstrcpy( fileOpendirInp.dirName, dataObjInfo->filePath, MAX_NAME_LEN );
521  rstrcpy( fileOpendirInp.resc_name_, dataObjInfo->rescName, MAX_NAME_LEN );
522  rstrcpy( fileOpendirInp.resc_hier_, dataObjInfo->rescHier, MAX_NAME_LEN );
523  rstrcpy( fileOpendirInp.addr.hostAddr, location.c_str(), NAME_LEN );
524 
525  status = rsFileOpendir( rsComm, &fileOpendirInp );
526  if ( status < 0 ) {
528  "l3Opendir: rsFileOpendir for %s error, status = %d",
529  dataObjInfo->filePath, status );
530  }
531  }
532  return status;
533 }
rodsLog
void rodsLog(int level, const char *formatStr,...)
Definition: rodsLog.cpp:86
getValByKey
char * getValByKey(const keyValPair_t *condInput, const char *keyWord)
Definition: rcMisc.cpp:675
DataObjInp::objPath
char objPath[(1024+64)]
Definition: dataObjInpOut.h:66
NULL
#define NULL
Definition: rodsDef.h:70
rodsStat::st_mode
unsigned int st_mode
Definition: rodsType.h:56
fileReaddirInp_t::fileInx
int fileInx
Definition: fileReaddir.h:8
SubStructFileFdOpr::addr
rodsHostAddr_t addr
Definition: subStructFileRead.h:9
rsComm_t
Definition: rcConnect.h:145
addKeyVal
int addKeyVal(keyValPair_t *condInput, const char *keyWord, const char *value)
Definition: rcMisc.cpp:789
specCollClosedir
int specCollClosedir(rsComm_t *rsComm, int specCollInx)
Definition: rsQuerySpecColl.cpp:442
SYS_INTERNAL_NULL_INPUT_ERR
@ SYS_INTERNAL_NULL_INPUT_ERR
Definition: rodsErrorTable.h:92
rodsStat::st_ctim
unsigned int st_ctim
Definition: rodsType.h:63
DataObjInp::openFlags
int openFlags
Definition: dataObjInpOut.h:68
rsQuerySpecColl
int rsQuerySpecColl(rsComm_t *rsComm, dataObjInp_t *dataObjInp, genQueryOut_t **genQueryOut)
Definition: rsQuerySpecColl.cpp:37
specCollDesc::parentInx
int parentInx
Definition: querySpecColl.h:13
specColl.hpp
rodsServerHost::conn
rcComm_t * conn
Definition: rodsConnect.h:64
SqlResult::attriInx
int attriInx
Definition: rodsGenQuery.h:62
Subfile
Definition: objInfo.h:316
UNKNOWN_OBJ_T
@ UNKNOWN_OBJ_T
Definition: rodsType.h:37
fileClosedirInp_t
Definition: fileClosedir.h:6
irods_stacktrace.hpp
PASS
#define PASS(prev_error_)
Definition: irods_error.hpp:118
resc_mgr
irods::resource_manager resc_mgr
Definition: irods_resource_manager.cpp:31
Subfile::subFilePath
char subFilePath[(1024+64)]
Definition: objInfo.h:318
irods::resolve_resource_hierarchy
error resolve_resource_hierarchy(const std::string &, rsComm_t *, dataObjInp_t *, std::string &, dataObjInfo_t **_data_obj_info=0)
Definition: irods_resource_redirect.cpp:505
rodsDirent::d_name
char d_name[256]
Definition: rodsType.h:75
fileReaddir.h
rsSubStructFileReaddir
int rsSubStructFileReaddir(rsComm_t *rsComm, subStructFileFdOprInp_t *subStructFileReaddirInp, rodsDirent_t **rodsDirent)
Definition: rsSubStructFileReaddir.cpp:11
specCollDesc::l3descInx
int l3descInx
Definition: querySpecColl.h:10
fileOpendirInp_t::resc_name_
char resc_name_[(1024+64)]
Definition: fileOpendir.h:8
fileClosedirInp_t::fileInx
int fileInx
Definition: fileClosedir.h:7
subStructFileReaddir.h
REMOTE_HOST
#define REMOTE_HOST
Definition: rodsConnect.h:45
rcMisc.h
freeDataObjInfo
int freeDataObjInfo(dataObjInfo_t *dataObjInfo)
Definition: rcMisc.cpp:544
DataObjInfo::rescId
rodsLong_t rescId
Definition: objInfo.h:164
SpecColl::type
structFileType_t type
Definition: objInfo.h:78
getStructFileType
int getStructFileType(specColl_t *specColl)
Definition: objMetaOpr.cpp:386
DataObjInfo::rescHier
char rescHier[(1024+64)]
Definition: objInfo.h:132
specCollReaddir
int specCollReaddir(rsComm_t *rsComm, int specCollInx, rodsDirent_t **rodsDirent)
Definition: rsQuerySpecColl.cpp:394
specCollDesc::dataObjInfo
dataObjInfo_t * dataObjInfo
Definition: querySpecColl.h:12
rodsStat::st_mtim
unsigned int st_mtim
Definition: rodsType.h:62
irods_resource_backport.hpp
Subfile::specColl
specColl_t * specColl
Definition: objInfo.h:322
SpecColl
Definition: objInfo.h:76
rsFileReaddir
int rsFileReaddir(rsComm_t *rsComm, fileReaddirInp_t *fileReaddirInp, rodsDirent_t **fileReaddirOut)
Definition: rsFileReaddir.cpp:16
PASSMSG
#define PASSMSG(message_, prev_error_)
Definition: irods_error.hpp:119
rsFileOpendir.hpp
fileStat.h
openSpecColl
int openSpecColl(rsComm_t *rsComm, dataObjInp_t *dataObjInp, int parentInx)
Definition: rsQuerySpecColl.cpp:114
rcGlobalExtern.h
DataObjInfo::filePath
char filePath[(1024+64)]
Definition: objInfo.h:137
LOG_ERROR
#define LOG_ERROR
Definition: rodsLog.h:43
irods_resource_redirect.hpp
RECURSIVE_OPR__KW
#define RECURSIVE_OPR__KW
Definition: rodsKeyWdDef.h:66
GenQueryOut::sqlResult
sqlResult_t sqlResult[50]
Definition: rodsGenQuery.h:72
DataObjInfo::specColl
specColl_t * specColl
Definition: objInfo.h:158
rsSubStructFileClosedir
int rsSubStructFileClosedir(rsComm_t *rsComm, subStructFileFdOprInp_t *subStructFileClosedirInp)
Definition: rsSubStructFileClosedir.cpp:12
fileClosedir.h
SubStructFileFdOpr
Definition: subStructFileRead.h:8
rodsStat::st_size
rodsLong_t st_size
Definition: rodsType.h:53
MAX_SPEC_COLL_ROW
#define MAX_SPEC_COLL_ROW
Definition: querySpecColl.h:17
COLL_OBJ_T
@ COLL_OBJ_T
Definition: rodsType.h:39
COL_DATA_NAME
#define COL_DATA_NAME
Definition: rodsGenQuery.h:165
_rsQuerySpecColl
int _rsQuerySpecColl(rsComm_t *rsComm, int specCollInx, dataObjInp_t *dataObjInp, genQueryOut_t *genQueryOut, int continueFlag)
Definition: rsQuerySpecColl.cpp:217
rsGlobalExtern.hpp
irods::OPEN_OPERATION
const std::string OPEN_OPERATION("OPEN")
irods::error::code
long long code() const
Definition: irods_error.cpp:194
rodsStat
Definition: rodsType.h:52
LINKED_COLL
@ LINKED_COLL
Definition: objInfo.h:49
RESC_HIER_STR_KW
#define RESC_HIER_STR_KW
Definition: rodsKeyWdDef.h:225
freeSpecCollDesc
int freeSpecCollDesc(int specCollInx)
Definition: objDesc.cpp:91
rsSubStructFileOpendir.hpp
l3Stat
int l3Stat(rsComm_t *rsComm, dataObjInfo_t *dataObjInfo, rodsStat_t **myStat)
Definition: rsDataObjClose.cpp:768
rsSubStructFileOpendir
int rsSubStructFileOpendir(rsComm_t *rsComm, subFile_t *subFile)
Definition: rsSubStructFileOpendir.cpp:12
fileOpendirInp_t
Definition: fileOpendir.h:7
GenQueryOut::continueInx
int continueInx
Definition: rodsGenQuery.h:70
COL_D_MODIFY_TIME
#define COL_D_MODIFY_TIME
Definition: rodsGenQuery.h:182
fileOpendirInp_t::dirName
char dirName[(1024+64)]
Definition: fileOpendir.h:12
fileOpendirInp_t::resc_hier_
char resc_hier_[(1024+64)]
Definition: fileOpendir.h:9
rsSubStructFileClosedir.hpp
rsFileOpendir
int rsFileOpendir(rsComm_t *rsComm, fileOpendirInp_t *fileOpendirInp)
Definition: rsFileOpendir.cpp:20
fileOpendir.h
l3Opendir
int l3Opendir(rsComm_t *rsComm, dataObjInfo_t *dataObjInfo)
Definition: rsQuerySpecColl.cpp:489
COL_D_CREATE_TIME
#define COL_D_CREATE_TIME
Definition: rodsGenQuery.h:181
UNKNOWN_COLL_PERM
@ UNKNOWN_COLL_PERM
Definition: objInfo.h:97
DataObjInp
Definition: dataObjInpOut.h:65
rsDataObjClose.hpp
genQuery.h
MAX_NAME_LEN
#define MAX_NAME_LEN
Definition: rodsDef.h:61
Subfile::addr
rodsHostAddr_t addr
Definition: objInfo.h:317
initOutForQuerySpecColl
int initOutForQuerySpecColl(genQueryOut_t **genQueryOut)
Definition: rsQuerySpecColl.cpp:168
rsFileReaddir.hpp
GenQueryOut
Definition: rodsGenQuery.h:67
SEL_OBJ_TYPE_KW
#define SEL_OBJ_TYPE_KW
Definition: rodsKeyWdDef.h:71
querySpecColl.h
irods.pypyodbc.status
status
Definition: pypyodbc.py:467
GenQueryOut::attriCnt
int attriCnt
Definition: rodsGenQuery.h:69
GenQueryOut::rowCnt
int rowCnt
Definition: rodsGenQuery.h:68
irods::log
void log(const error &)
Definition: irods_log.cpp:13
rodsDirent
Definition: rodsType.h:70
rsFileClosedir.hpp
LOG_NOTICE
#define LOG_NOTICE
Definition: rodsLog.h:33
dataObjClose.h
subStructFileOpendir.h
resolvePathInSpecColl
int resolvePathInSpecColl(rsComm_t *rsComm, char *objPath, specCollPerm_t specCollPerm, int inCachOnly, dataObjInfo_t **dataObjInfo)
Definition: specColl.cpp:644
irods::error
Definition: irods_error.hpp:23
DATA_OBJ_T
@ DATA_OBJ_T
Definition: rodsType.h:38
getAndConnRcatHost
int getAndConnRcatHost(rsComm_t *rsComm, int rcatType, const char *rcatZoneHint, rodsServerHost_t **rodsServerHost)
Definition: rodsConnect.cpp:26
subStructFileClosedir.h
BAD_INPUT_DESC_INDEX
@ BAD_INPUT_DESC_INDEX
Definition: rodsErrorTable.h:266
FD_INUSE
#define FD_INUSE
Definition: fileOpr.hpp:21
SubStructFileFdOpr::resc_hier
char resc_hier[(1024+64)]
Definition: subStructFileRead.h:13
SqlResult::value
char * value
Definition: rodsGenQuery.h:64
SubStructFileFdOpr::fd
int fd
Definition: subStructFileRead.h:11
irods_hierarchy_parser.hpp
SYS_UNKNOWN_SPEC_COLL_CLASS
@ SYS_UNKNOWN_SPEC_COLL_CLASS
Definition: rodsErrorTable.h:127
irods::resource_manager::hier_to_leaf_id
error hier_to_leaf_id(const std::string &, rodsLong_t &)
Definition: irods_resource_manager.cpp:1082
SubStructFileFdOpr::type
structFileType_t type
Definition: subStructFileRead.h:10
rodsServerHost
Definition: rodsConnect.h:62
DataObjInfo::rescName
char rescName[64]
Definition: objInfo.h:131
rodsHostAddr_t::hostAddr
char hostAddr[256]
Definition: rodsDef.h:297
CAT_NO_ROWS_FOUND
@ CAT_NO_ROWS_FOUND
Definition: rodsErrorTable.h:423
rsFileClosedir
int rsFileClosedir(rsComm_t *rsComm, fileClosedirInp_t *fileClosedirInp)
Definition: rsFileClosedir.cpp:16
COL_COLL_NAME
#define COL_COLL_NAME
Definition: rodsGenQuery.h:189
MOUNTED_COLL
@ MOUNTED_COLL
Definition: objInfo.h:48
rsQuerySpecColl.hpp
SqlResult::len
int len
Definition: rodsGenQuery.h:63
SLAVE_RCAT
#define SLAVE_RCAT
Definition: rodsDef.h:86
DataObjInfo::objPath
char objPath[(1024+64)]
Definition: objInfo.h:130
fileOpendirInp_t::addr
rodsHostAddr_t addr
Definition: fileOpendir.h:11
rstrcpy
char * rstrcpy(char *dest, const char *src, int maxLen)
Definition: stringOpr.cpp:51
rsSubStructFileReaddir.hpp
DataObjInp::condInput
keyValPair_t condInput
Definition: dataObjInpOut.h:74
irods::get_loc_for_hier_string
error get_loc_for_hier_string(const std::string &_hier, std::string &_loc)
Definition: irods_resource_backport.cpp:633
freeGenQueryOut
int freeGenQueryOut(genQueryOut_t **genQueryOut)
Definition: rcMisc.cpp:1133
fileReaddirInp_t
Definition: fileReaddir.h:7
NAME_LEN
#define NAME_LEN
Definition: rodsDef.h:55
irods::error::ok
bool ok()
Definition: irods_error.cpp:258
DataObjInfo
Definition: objInfo.h:129
COL_DATA_SIZE
#define COL_DATA_SIZE
Definition: rodsGenQuery.h:169
allocSpecCollDesc
int allocSpecCollDesc()
Definition: objDesc.cpp:74
SpecCollDesc
specCollDesc_t SpecCollDesc[100]
Definition: irods_server_globals.cpp:30
objMetaOpr.hpp
objType_t
objType_t
Definition: rodsType.h:36
SpecColl::collClass
specCollClass_t collClass
Definition: objInfo.h:77
rcQuerySpecColl
int rcQuerySpecColl(rcComm_t *conn, dataObjInp_t *querySpecCollInp, genQueryOut_t **genQueryOut)
Definition: rcQuerySpecColl.cpp:33
DataObjInfo::subPath
char subPath[(1024+64)]
Definition: objInfo.h:157