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)  

rodsPath.h File Reference
#include "rodsDef.h"
#include "rods.h"
#include "getRodsEnv.h"
#include "rodsType.h"
#include "objStat.h"
Include dependency graph for rodsPath.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  RodsPath
 
struct  RodsPathInp
 

Macros

#define STDOUT_FILE_NAME   "-" /* pipe to stdout */
 
#define ALLOW_NO_SRC_FLAG   0x1
 

Typedefs

typedef struct RodsPath rodsPath_t
 
typedef struct RodsPathInp rodsPathInp_t
 

Functions

int parseRodsPath (rodsPath_t *rodsPath, rodsEnv *myRodsEnv)
 
int parseRodsPathStr (const char *inPath, rodsEnv *myRodsEnv, char *outPath)
 
int addSrcInPath (rodsPathInp_t *rodsPathInp, const char *inPath)
 
int parseLocalPath (rodsPath_t *rodsPath)
 
int parseCmdLinePath (int argc, char **argv, int optInd, rodsEnv *myRodsEnv, int srcFileType, int destFileType, int flag, rodsPathInp_t *rodsPathInp)
 
int getLastPathElement (char *inPath, char *lastElement)
 
int getFileType (rodsPath_t *rodsPath)
 
void clearRodsPath (rodsPath_t *rodsPath)
 
char * escape_path (const char *_path)
 
int has_trailing_path_separator (const char *path)
 
void remove_trailing_path_separators (char *path)
 
int has_prefix (const char *path, const char *prefix)
 

Macro Definition Documentation

◆ ALLOW_NO_SRC_FLAG

#define ALLOW_NO_SRC_FLAG   0x1

Definition at line 45 of file rodsPath.h.

◆ STDOUT_FILE_NAME

#define STDOUT_FILE_NAME   "-" /* pipe to stdout */

Definition at line 17 of file rodsPath.h.

Typedef Documentation

◆ rodsPath_t

typedef struct RodsPath rodsPath_t

◆ rodsPathInp_t

typedef struct RodsPathInp rodsPathInp_t

Function Documentation

◆ addSrcInPath()

int addSrcInPath ( rodsPathInp_t rodsPathInp,
const char *  inPath 
)

Definition at line 261 of file rodsPath.cpp.

References RodsPath::inPath, LOG_ERROR, MAX_NAME_LEN, NULL, RodsPathInp::numSrc, PTR_ARRAY_MALLOC_LEN, rodsLog(), rstrcpy(), RodsPathInp::srcPath, RodsPathInp::targPath, and USER__NULL_INPUT_ERR.

Referenced by build_irods_path_structure(), parseCmdLinePath(), and rmtrashUtil().

Here is the call graph for this function:

◆ clearRodsPath()

void clearRodsPath ( rodsPath_t rodsPath)

Definition at line 481 of file rodsPath.cpp.

References freeRodsObjStat(), NULL, and RodsPath::rodsObjStat.

Referenced by mkCollR().

Here is the call graph for this function:

◆ escape_path()

char* escape_path ( const char *  _path)

Definition at line 497 of file rodsPath.cpp.

References irods::experimental::filesystem::client::end(), and size.

Referenced by build_irods_path_structure(), and parseCmdLinePath().

Here is the call graph for this function:

◆ getFileType()

int getFileType ( rodsPath_t rodsPath)

Definition at line 232 of file rodsPath.cpp.

References terminate_irods_processes::e, EXIST_ST, irods::experimental::administration::client::v1::exists(), LOCAL_DIR_T, LOCAL_FILE_T, NOT_EXIST_ST, RodsPath::objState, RodsPath::objType, RodsPath::outPath, pid_age::p, RodsPath::size, SYS_NO_PATH_PERMISSION, and UNKNOWN_FILE_T.

Referenced by parseLocalPath(), and rsyncCollToDirUtil().

Here is the call graph for this function:

◆ getLastPathElement()

int getLastPathElement ( char *  inPath,
char *  lastElement 
)

Definition at line 444 of file rodsPath.cpp.

References MAX_NAME_LEN, and rstrcpy().

Referenced by resolveRodsTarget().

Here is the call graph for this function:

◆ has_prefix()

int has_prefix ( const char *  path,
const char *  prefix 
)

Returns whether path starts with prefix.

path and prefix are expected to be null-terminated strings. The behavior is undefined if either string is not null-terminated.

Since
4.2.8
Parameters
[in]pathThe path to search.
[in]prefixThe path to look for.
Returns
An interger value.
Return values
non-zeroIf path starts with prefix.
0Otherwise.

Definition at line 561 of file rodsPath.cpp.

References irods::experimental::filesystem::client::begin(), and irods::experimental::filesystem::client::end().

Referenced by dataObjUnlinkS(), isInVault(), and irods::experimental::filesystem::client::rename().

Here is the call graph for this function:

◆ has_trailing_path_separator()

int has_trailing_path_separator ( const char *  path)

Definition at line 526 of file rodsPath.cpp.

References pid_age::p.

Referenced by rsDataObjCreate(), and rsDataObjOpen().

◆ parseCmdLinePath()

int parseCmdLinePath ( int  argc,
char **  argv,
int  optInd,
rodsEnv myRodsEnv,
int  srcFileType,
int  destFileType,
int  flag,
rodsPathInp_t rodsPathInp 
)

Definition at line 356 of file rodsPath.cpp.

References addSrcInPath(), ALLOW_NO_SRC_FLAG, COLL_OBJ_T, RodsPathInp::destPath, escape_path(), RodsPath::inPath, LOG_ERROR, MAX_NAME_LEN, NO_INPUT_T, NULL, RodsPath::outPath, parseLocalPath(), parseRodsPath(), rodsLog(), rstrcpy(), RodsPathInp::srcPath, irods.pypyodbc::status, and USER__NULL_INPUT_ERR.

Here is the call graph for this function:

◆ parseLocalPath()

int parseLocalPath ( rodsPath_t rodsPath)

Definition at line 215 of file rodsPath.cpp.

References getFileType(), RodsPath::inPath, MAX_NAME_LEN, NULL, RodsPath::outPath, rstrcpy(), and USER__NULL_INPUT_ERR.

Referenced by build_irods_path_structure(), and parseCmdLinePath().

Here is the call graph for this function:

◆ parseRodsPath()

int parseRodsPath ( rodsPath_t rodsPath,
rodsEnv myRodsEnv 
)

Definition at line 54 of file rodsPath.cpp.

References COLL_OBJ_T, RodsPath::inPath, LOG_ERROR, MAX_NAME_LEN, MAX_PATH_ALLOWED, NULL, RodsPath::objState, RodsPath::objType, RodsPath::outPath, rodsEnv::rodsCwd, rodsEnv::rodsHome, rodsLog(), rstrcpy(), UNKNOWN_OBJ_T, UNKNOWN_ST, USER__NULL_INPUT_ERR, USER_INPUT_PATH_ERR, and USER_PATH_EXCEEDS_MAX.

Referenced by build_irods_path_structure(), parseCmdLinePath(), and parseRodsPathStr().

Here is the call graph for this function:

◆ parseRodsPathStr()

int parseRodsPathStr ( const char *  inPath,
rodsEnv myRodsEnv,
char *  outPath 
)

Definition at line 29 of file rodsPath.cpp.

References RodsPath::inPath, MAX_NAME_LEN, RodsPath::outPath, parseRodsPath(), rstrcpy(), and irods.pypyodbc::status.

Here is the call graph for this function:

◆ remove_trailing_path_separators()

void remove_trailing_path_separators ( char *  path)

Definition at line 536 of file rodsPath.cpp.

References irods::experimental::filesystem::client::begin(), irods.pyparsing::empty, irods::experimental::filesystem::client::end(), and pid_age::p.

Referenced by rsCollCreate(), rsDataObjGet(), and rsOpenCollection().

Here is the call graph for this function: