mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 23:35:33 +08:00
refs #209, fileExists method (remote enabled)
This commit is contained in:
@@ -127,6 +127,9 @@ namespace BlackCore
|
||||
//! Remote enabled version of deleting a file
|
||||
virtual bool removeFile(const QString &fileName) = 0;
|
||||
|
||||
//! Remote enabled version of file exists
|
||||
virtual bool existsFile(const QString &fileName) = 0;
|
||||
|
||||
private:
|
||||
//! All contexts, used with messageHandler
|
||||
static QList<IContextApplication *> s_contexts;
|
||||
|
||||
@@ -99,4 +99,13 @@ namespace BlackCore
|
||||
return QFile::remove(fileName);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check file
|
||||
*/
|
||||
bool CContextApplication::existsFile(const QString &fileName)
|
||||
{
|
||||
if (fileName.isEmpty()) return false;
|
||||
return QFile::exists(fileName);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -45,6 +45,9 @@ namespace BlackCore
|
||||
//! \copydoc IContextApplication::removeFile
|
||||
virtual bool removeFile(const QString &fileName) override;
|
||||
|
||||
//! \copydoc IContextApplication::existsFile
|
||||
virtual bool existsFile(const QString &fileName) override;
|
||||
|
||||
protected:
|
||||
//! Constructor
|
||||
CContextApplication(CRuntimeConfig::ContextMode mode, CRuntime *runtime);
|
||||
|
||||
@@ -46,6 +46,9 @@ namespace BlackCore
|
||||
//! \copydoc IContextApplication::removeFile
|
||||
virtual bool removeFile(const QString &fileName) override;
|
||||
|
||||
//! \copydoc IContextApplication::existsFile
|
||||
virtual bool existsFile(const QString &fileName) override;
|
||||
|
||||
protected:
|
||||
//! Constructor
|
||||
CContextApplicationProxy(CRuntimeConfig::ContextMode mode, CRuntime *runtime) : IContextApplication(mode, runtime), m_dBusInterface(nullptr) {}
|
||||
|
||||
Reference in New Issue
Block a user