26 #define IRODS_FILESYSTEM_ENABLE_SERVER_SIDE_API
37 const int dest_l1_inx,
42 if (opr_status >= 0) {
46 if (dest_data_obj_inp && src_data_obj_info) {
49 ( *transStat )->bytesWritten = src_data_obj_info->
dataSize;
50 ( *transStat )->numThreads = dest_data_obj_inp->
numThreads;
51 close_inp.bytesWritten = src_data_obj_info->
dataSize;
55 if (close_status < 0) {
57 __FUNCTION__, close_status);
79 if ( destDataObjInp ==
NULL ) {
83 if ( destDataObjInfo ==
NULL ) {
87 if ( srcDataObjInp ==
NULL ) {
91 if ( srcDataObjInfo ==
NULL ) {
96 if (
L1desc[srcL1descInx].l3descInx <= 2 ) {
114 (boost::format(
"splitPathByKey failed for [%s]") %
115 destDataObjInfo->
objPath).str().c_str())};
121 (boost::format(
"rsMkCollR for [%s] failed") %
122 parColl).str().c_str())};
129 (boost::format(
"[%s] - svrRegDataObj for [%s] failed, status = [%d]") %
130 __FUNCTION__ % destDataObjInfo->
objPath %
status).str().c_str());
151 int srcL1descInx, destL1descInx;
169 if (fs::path{destDataObjInp->
objPath}.is_relative()) {
173 catch (
const fs::filesystem_error & err) {
174 return err.code().value();
182 if ( remoteFlag < 0 ) {
191 if ( strcmp( srcDataObjInp->
objPath, destDataObjInp->
objPath ) == 0 ) {
193 "rsDataObjCopy: same src and dest objPath %s not allowed",
202 if ( srcL1descInx < 0 ) {
203 std::stringstream msg;
204 char* sys_error =
NULL;
205 const char* rods_error =
rodsErrorName( srcL1descInx, &sys_error );
207 msg <<
" - Failed to open source object: \"";
210 msg << rods_error <<
" " << sys_error;
220 createMode = atoi(
L1desc[srcL1descInx].dataObjInfo->dataMode );
222 if ( createMode >= 0100 ) {
228 if (
L1desc[srcL1descInx].l3descInx <= 2 ) {
243 if ( destL1descInx < 0 ) {
249 __FUNCTION__, srcDataObjInp->
objPath, close_status);
253 std::stringstream msg;
254 char* sys_error =
NULL;
255 const char* rods_error =
rodsErrorName( destL1descInx, &sys_error );
257 msg <<
" - Failed to create destination object: \"";
258 msg << destDataObjInp->
objPath;
260 msg << rods_error <<
" " << sys_error;
263 return destL1descInx;
285 status = _rsDataObjCopy(rsComm, destL1descInx, existFlag);
287 const int close_status = close_objects(rsComm, destL1descInx,
status, transStat);