RemoteFileRenameOperation::RemoteFileRenameOperation(FileInfo sourceFileInfo, FileInfo targetFileInfo, const TCHAR *pathToTargetRoot) { FileInfoList srcList(sourceFileInfo); FileInfoList dstList(targetFileInfo); getRemotePath(&srcList, pathToTargetRoot, &m_pathToSourceFile); getRemotePath(&dstList, pathToTargetRoot, &m_pathToTargetFile); }
NS_IMETHODIMP nsAbMDBDirProperty::CopyDBMailList(nsIAbMDBDirectory* srcListDB) { nsresult err = NS_OK; nsCOMPtr<nsIAbDirectory> srcList(do_QueryInterface(srcListDB)); if (NS_FAILED(err)) return NS_ERROR_NULL_POINTER; CopyMailList (srcList); PRUint32 rowID; srcListDB->GetDbRowID(&rowID); SetDbRowID(rowID); return NS_OK; }
void filestuff::copyDir(QString src, QString dest) { exMake(dest); QDir srcDir(src); QDir destDir(dest); QStringList srcList(srcDir.entryList(QDir::Files)); for (int i = 0; i < srcList.count(); i++){ QString srcName(src + "/" + srcList[i]); QString destName(dest + "/" + srcList[i]); QFile::copy(srcName, destName); } srcList.clear(); srcList = srcDir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot); for (int i = 0; i < srcList.count(); i++){ QString srcName(src + "/" + srcList[i]); QString destName(dest + "/" + srcList[i]); copyDir(srcName, destName); } }