Logo Search packages:      
Sourcecode: maxdb-7.5.00 version File versions

SAPDB_Bool Studio_DBFSObject::moveItem ( const Tools_DynamicUTF8String sCompleteOldPath,
const Tools_DynamicUTF8String sCompleteNewPath,
Tools_DynamicUTF8String sError 

------------------------------------------------------------------------- function: moveItem description: move a file or folder arguments: [in] sCompleteOldPath, complete old path of item [in] sCompleteNewPath, complete new path of item [out] sError, error text, if one occured

return value: true if success


Definition at line 442 of file Studio_DBFSObject.cpp.

References closeDir(), Tools_DynamicUTF8String::Erase(), getDBFSError(), openDir(), and Tools_DynamicUTF8String::StrPtr().

Referenced by StudioWeb_StoredQueryTree::moveToFolder().



      Tools_DynamicUTF8String strCopyOfNewPath = sCompleteNewPath;      
      Tools_DynamicUTF8String strCopyOfOldPath = sCompleteOldPath;
      // first check if folder exists, because move create a item if it does noit exits
      // here a error code is wanted

      SAPDB_Int2 lfno = openDir(sCompleteNewPath,sError);  
    if ( lfno == -1 )  return SAPDB_FALSE;

      if(closeDir(lfno,sError) == SAPDB_FALSE) return SAPDB_FALSE;
      if (wd101Mv(m_pDBFS,(const char*)strCopyOfOldPath.StrPtr(),(const char*)strCopyOfNewPath.StrPtr()) == sapdbwa_False){
            return SAPDB_FALSE;

      return SAPDB_TRUE;

Generated by  Doxygen 1.6.0   Back to index