digiKam
Digikam::DFileOperations Class Reference

Static Public Member Functions

static bool copyFile (const QString &srcFile, const QString &dstFile)
 
static bool copyFiles (const QStringList &srcPaths, const QString &dstPath)
 
static bool copyFolderRecursively (const QString &srcPath, const QString &dstPath, const QString &itemId=QString(), bool *const cancel=nullptr, bool countTotal=true)
 
static bool copyModificationTime (const QString &srcFile, const QString &dstFile)
 
static QUrl getUniqueFileUrl (const QUrl &orgUrl, bool *const newurl=nullptr)
 
static QUrl getUniqueFolderUrl (const QUrl &orgUrl)
 
static bool localFileRename (const QString &source, const QString &orgPath, const QString &destPath, bool ignoreSettings=false)
 
static void openFilesWithDefaultApplication (const QList< QUrl > &urls)
 
static void openInFileManager (const QList< QUrl > &urls)
 
static bool renameFile (const QString &srcFile, const QString &dstFile)
 
static bool setModificationTime (const QString &srcFile, const QDateTime &dateTime)
 

Member Function Documentation

◆ copyFile()

bool Digikam::DFileOperations::copyFile ( const QString &  srcFile,
const QString &  dstFile 
)
static

Copy file and keep the source file modification time.

References copyModificationTime().

Referenced by copyFiles(), copyFolderRecursively(), and Digikam::CopyOrMoveJob::run().

◆ copyFiles()

bool Digikam::DFileOperations::copyFiles ( const QStringList &  srcPaths,
const QString &  dstPath 
)
static

Copy a list of files to another place.

References copyFile().

◆ copyFolderRecursively()

bool Digikam::DFileOperations::copyFolderRecursively ( const QString &  srcPath,
const QString &  dstPath,
const QString &  itemId = QString(),
bool *const  cancel = nullptr,
bool  countTotal = true 
)
static

◆ copyModificationTime()

bool Digikam::DFileOperations::copyModificationTime ( const QString &  srcFile,
const QString &  dstFile 
)
static

◆ getUniqueFileUrl()

QUrl Digikam::DFileOperations::getUniqueFileUrl ( const QUrl &  orgUrl,
bool *const  newurl = nullptr 
)
static

Get unique file url if file exist by appending a counter suffix or return original url.

Referenced by Digikam::CopyOrMoveJob::run(), Digikam::RestoreDTrashItemsJob::run(), Digikam::VidSlideTask::run(), and Digikam::Task::run().

◆ getUniqueFolderUrl()

QUrl Digikam::DFileOperations::getUniqueFolderUrl ( const QUrl &  orgUrl)
static

Get unique folder url if folder exist by appending a counter suffix or return original url.

Referenced by Digikam::CopyOrMoveJob::run().

◆ localFileRename()

bool Digikam::DFileOperations::localFileRename ( const QString &  source,
const QString &  orgPath,
const QString &  destPath,
bool  ignoreSettings = false 
)
static

This method rename a local file 'orgPath' to 'destPath' with all ACL properties restoration taken from 'source' file. Return true if operation is completed.

References copyModificationTime(), Digikam::MetaEngineSettings::instance(), renameFile(), Digikam::MetaEngineSettings::settings(), and Digikam::MetaEngineSettingsContainer::updateFileTimeStamp.

Referenced by Digikam::EditorWindow::moveLocalFile(), and Digikam::Task::run().

◆ openFilesWithDefaultApplication()

void Digikam::DFileOperations::openFilesWithDefaultApplication ( const QList< QUrl > &  urls)
static

Open file urls to default application relevant of file type-mimes desktop configuration.

Referenced by Digikam::ItemViewUtilities::openInfosWithDefaultApplication().

◆ openInFileManager()

void Digikam::DFileOperations::openInFileManager ( const QList< QUrl > &  urls)
static

Open system file manager and select the item.

Referenced by Digikam::ItemIconView::slotAlbumOpenInFileManager().

◆ renameFile()

bool Digikam::DFileOperations::renameFile ( const QString &  srcFile,
const QString &  dstFile 
)
static

Rename or move file and keep the source file modification time.

Referenced by localFileRename(), Digikam::CopyOrMoveJob::run(), and Digikam::RenameFileJob::run().

◆ setModificationTime()

bool Digikam::DFileOperations::setModificationTime ( const QString &  srcFile,
const QDateTime &  dateTime 
)
static

Set file modification time from QDateTime. Keep access time from source file.

Referenced by Digikam::GPCamera::downloadItem(), and Digikam::DNGWriter::Private::exportTarget().


The documentation for this class was generated from the following files: