Compatibility Members for QFileInfo

以下成员源于类 QFileInfo are part of the Qt compatibility layer. We advise against using them in new code.

公共类型

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

公共函数

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

成员类型文档编制

enum QFileInfo:: Permission
flags QFileInfo:: PermissionSpec

常量
QFileInfo::ReadOwner QFile::ReadOwner
QFileInfo::WriteOwner QFile::WriteOwner
QFileInfo::ExeOwner QFile::ExeOwner
QFileInfo::ReadUser QFile::ReadUser
QFileInfo::WriteUser QFile::WriteUser
QFileInfo::ExeUser QFile::ExeUser
QFileInfo::ReadGroup QFile::ReadGroup
QFileInfo::WriteGroup QFile::WriteGroup
QFileInfo::ExeGroup QFile::ExeGroup
QFileInfo::ReadOther QFile::ReadOther
QFileInfo::WriteOther QFile::WriteOther
QFileInfo::ExeOther QFile::ExeOther

The PermissionSpec type is a typedef for QFlags <Permission>。它存储 Permission 值的 OR 组合。

成员函数文档编制

QString QFileInfo:: absFilePath () const

使用 absoluteFilePath () 代替。

QString QFileInfo:: baseName ( bool complete )

使用 completeBaseName () 或 baseName () overload that takes no parameters instead.

bool QFileInfo:: convertToAbs ()

使用 makeAbsolute () 代替。

QDir QFileInfo:: dir ( bool absPath ) const

使用 absoluteDir () 或 dir () overload that takes no parameters instead.

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

使用 absolutePath () if the absolute path is wanted ( absPath is true) or path () if it's not necessary ( absPath 为 false)。

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

使用 completeSuffix () 或 suffix () 代替。

bool QFileInfo:: permission ( PermissionSpec permissions ) const

使用 permission () 代替。