Compatibility Members for QFileInfo

The following members of class QFileInfoare part of the Qt compatibility layer. We advise against using them in new code.

Public Types

enum Permission { ReadOwner, WriteOwner, ExeOwner, ReadUser, ..., ExeOther }

Public Functions

QString absFilePath() const
QString baseName(bool complete)
bool convertToAbs()
QDir dir(bool absPath) const
QString dirPath(bool absPath = false) const
QString extension(bool complete = true) const
bool permission(PermissionSpec permissions) const

Member Type Documentation

enum QFileInfo::Permission
flags QFileInfo::PermissionSpec

ConstantValue
QFileInfo::ReadOwnerQFile::ReadOwner
QFileInfo::WriteOwnerQFile::WriteOwner
QFileInfo::ExeOwnerQFile::ExeOwner
QFileInfo::ReadUserQFile::ReadUser
QFileInfo::WriteUserQFile::WriteUser
QFileInfo::ExeUserQFile::ExeUser
QFileInfo::ReadGroupQFile::ReadGroup
QFileInfo::WriteGroupQFile::WriteGroup
QFileInfo::ExeGroupQFile::ExeGroup
QFileInfo::ReadOtherQFile::ReadOther
QFileInfo::WriteOtherQFile::WriteOther
QFileInfo::ExeOtherQFile::ExeOther

The PermissionSpec type is a typedef for QFlags<Permission>. It stores an OR combination of Permission values.

Member Function Documentation

QString QFileInfo::absFilePath() const

Use absoluteFilePath() instead.

QString QFileInfo::baseName(bool complete)

Use completeBaseName() or the baseName() overload that takes no parameters instead.

bool QFileInfo::convertToAbs()

Use makeAbsolute() instead.

QDir QFileInfo::dir(bool absPath) const

Use absoluteDir() or the dir() overload that takes no parameters instead.

QString QFileInfo::dirPath(bool absPath = false) const

Use absolutePath() if the absolute path is wanted (absPath is true) or path() if it's not necessary (absPath is false).

QString QFileInfo::extension(bool complete = true) const

Use completeSuffix() or suffix() instead.

bool QFileInfo::permission(PermissionSpec permissions) const

Use permission() instead.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.