#include #include #include #include #include namespace myx { namespace filesystem { CurrentExecutable::CurrentExecutable() : m_procFilePath( QStringLiteral( "/proc/self/exe" ) ) { auto canonicalFilePath = m_procFilePath.canonicalFilePath(); auto canonicalPath = m_procFilePath.canonicalPath(); m_fileName = canonicalFilePath.remove( canonicalPath ).remove( '/' ); m_canonicalFilePath = canonicalFilePath; m_canonicalPath = canonicalPath; } QFileInfo CurrentExecutable::canonicalFilePath() const { return( m_canonicalFilePath ); } QDir CurrentExecutable::canonicalPath() const { return( m_canonicalPath ); } QString CurrentExecutable::fileName() const { return( m_fileName ); } } // namespace filesystem } // namespace myx