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.
![]() ![]() |
#include "rodsPath.h"
#include "miscUtil.h"
#include "rcMisc.h"
#include "rodsErrorTable.h"
#include "rodsLog.h"
#include "filesystem/path.hpp"
#include <string>
#include <map>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/convenience.hpp>
Go to the source code of this file.
Functions | |
int | parseRodsPathStr (const char *inPath, rodsEnv *myRodsEnv, char *outPath) |
int | parseRodsPath (rodsPath_t *rodsPath, rodsEnv *myRodsEnv) |
int | parseLocalPath (rodsPath_t *rodsPath) |
int | getFileType (rodsPath_t *rodsPath) |
int | addSrcInPath (rodsPathInp_t *rodsPathInp, const char *inPath) |
int | parseCmdLinePath (int argc, char **argv, int optInd, rodsEnv *myRodsEnv, int srcFileType, int destFileType, int flag, rodsPathInp_t *rodsPathInp) |
int | getLastPathElement (char *_logical_path, char *_last_path_element) |
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) |
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().
void clearRodsPath | ( | rodsPath_t * | rodsPath | ) |
Definition at line 481 of file rodsPath.cpp.
References freeRodsObjStat(), NULL, and RodsPath::rodsObjStat.
Referenced by mkCollR().
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().
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().
int getLastPathElement | ( | char * | _logical_path, |
char * | _last_path_element | ||
) |
Definition at line 444 of file rodsPath.cpp.
References MAX_NAME_LEN, and rstrcpy().
Referenced by resolveRodsTarget().
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.
[in] | path | The path to search. |
[in] | prefix | The path to look for. |
non-zero | If path starts with prefix . |
0 | Otherwise. |
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().
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().
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.
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().
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().
Definition at line 29 of file rodsPath.cpp.
References RodsPath::inPath, MAX_NAME_LEN, RodsPath::outPath, parseRodsPath(), rstrcpy(), and irods.pypyodbc::status.
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().