Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/kmymoneyutils.cpp
Context not available. | |||||
48 | #include <KXmlGuiWindow> | 48 | #include <KXmlGuiWindow> | ||
---|---|---|---|---|---|
49 | #include <KMessageBox> | 49 | #include <KMessageBox> | ||
50 | #include <KStandardGuiItem> | 50 | #include <KStandardGuiItem> | ||
51 | #include <KIO/StatJob> | ||||
51 | 52 | | |||
52 | // ---------------------------------------------------------------------------- | 53 | // ---------------------------------------------------------------------------- | ||
53 | // Project Includes | 54 | // Project Includes | ||
Context not available. | |||||
648 | } | 649 | } | ||
649 | } | 650 | } | ||
650 | } | 651 | } | ||
652 | | ||||
653 | bool KMyMoneyUtils::fileExists(const QUrl &url) | ||||
654 | { | ||||
655 | bool fileExists = false; | ||||
656 | if (url.isValid()) { | ||||
657 | short int detailLevel = 0; // Lowest level: file/dir/symlink/none | ||||
658 | KIO::StatJob* statjob = KIO::stat(url, KIO::StatJob::SourceSide, detailLevel); | ||||
659 | bool noerror = statjob->exec(); | ||||
660 | if (noerror) { | ||||
661 | // We want a file | ||||
662 | fileExists = !statjob->statResult().isDir(); | ||||
663 | } | ||||
664 | } | ||||
665 | return fileExists; | ||||
666 | } | ||||
Context not available. |