API reference - Class QFileInfo

Notation used in Ruby API documentation

Description: Binding of QFileInfo

Public constructors

new QFileInfonewConstructor QFileInfo::QFileInfo()
new QFileInfonew(string file)Constructor QFileInfo::QFileInfo(const QString &file)
new QFileInfonew(const QFile file)Constructor QFileInfo::QFileInfo(const QFile &file)
new QFileInfonew(const QDir dir,
string file)
Constructor QFileInfo::QFileInfo(const QDir &dir, const QString &file)
new QFileInfonew(const QFileInfo fileinfo)Constructor QFileInfo::QFileInfo(const QFileInfo &fileinfo)

Public methods

bool!=(const QFileInfo fileinfo)Method bool QFileInfo::operator!=(const QFileInfo &fileinfo)
[const]bool!=(const QFileInfo fileinfo)Method bool QFileInfo::operator!=(const QFileInfo &fileinfo)
bool==(const QFileInfo fileinfo)Method bool QFileInfo::operator==(const QFileInfo &fileinfo)
[const]bool==(const QFileInfo fileinfo)Method bool QFileInfo::operator==(const QFileInfo &fileinfo)
void_assign(const QFileInfo other)Assigns another object to self
void_createEnsures the C++ object is created
void_destroyExplicitly destroys the object
[const]bool_destroyed?Returns a value indicating whether the object was already destroyed
[const]bool_is_const_object?Returns a value indicating whether the reference is a const reference
void_manageMarks the object as managed by the script side.
void_unmanageMarks the object as no longer owned by the script side.
[const]QDirabsoluteDirMethod QDir QFileInfo::absoluteDir()
[const]stringabsoluteFilePathMethod QString QFileInfo::absoluteFilePath()
[const]stringabsolutePathMethod QString QFileInfo::absolutePath()
QFileInfoassign(const QFileInfo fileinfo)Method QFileInfo &QFileInfo::operator=(const QFileInfo &fileinfo)
[const]stringbaseNameMethod QString QFileInfo::baseName()
[const]stringbundleNameMethod QString QFileInfo::bundleName()
[const]boolcachingMethod bool QFileInfo::caching()
voidcaching=(bool on)Method void QFileInfo::setCaching(bool on)
[const]stringcanonicalFilePathMethod QString QFileInfo::canonicalFilePath()
[const]stringcanonicalPathMethod QString QFileInfo::canonicalPath()
[const]stringcompleteBaseNameMethod QString QFileInfo::completeBaseName()
[const]stringcompleteSuffixMethod QString QFileInfo::completeSuffix()
[const]QDateTimecreatedMethod QDateTime QFileInfo::created()
voiddetachMethod void QFileInfo::detach()
[const]QDirdirMethod QDir QFileInfo::dir()
[const]new QFileInfo ptrdupCreates a copy of self
[const]boolexistsMethod bool QFileInfo::exists()
[const]stringfileNameMethod QString QFileInfo::fileName()
[const]stringfilePathMethod QString QFileInfo::filePath()
[const]stringgroupMethod QString QFileInfo::group()
[const]unsigned intgroupIdMethod unsigned int QFileInfo::groupId()
[const]boolisAbsolute?Method bool QFileInfo::isAbsolute()
[const]boolisBundle?Method bool QFileInfo::isBundle()
[const]boolisDir?Method bool QFileInfo::isDir()
[const]boolisExecutable?Method bool QFileInfo::isExecutable()
[const]boolisFile?Method bool QFileInfo::isFile()
[const]boolisHidden?Method bool QFileInfo::isHidden()
[const]boolisReadable?Method bool QFileInfo::isReadable()
[const]boolisRelative?Method bool QFileInfo::isRelative()
[const]boolisRoot?Method bool QFileInfo::isRoot()
[const]boolisSymLink?Method bool QFileInfo::isSymLink()
[const]boolisWritable?Method bool QFileInfo::isWritable()
[const]QDateTimelastModifiedMethod QDateTime QFileInfo::lastModified()
[const]QDateTimelastReadMethod QDateTime QFileInfo::lastRead()
boolmakeAbsoluteMethod bool QFileInfo::makeAbsolute()
[const]stringownerMethod QString QFileInfo::owner()
[const]unsigned intownerIdMethod unsigned int QFileInfo::ownerId()
[const]stringpathMethod QString QFileInfo::path()
[const]boolpermission(const QFile_QFlags_Permission permissions)Method bool QFileInfo::permission(QFlags<QFile::Permission> permissions)
[const]QFile_QFlags_PermissionpermissionsMethod QFlags<QFile::Permission> QFileInfo::permissions()
[const]stringreadLinkMethod QString QFileInfo::readLink()
voidrefreshMethod void QFileInfo::refresh()
voidsetCaching(bool on)Method void QFileInfo::setCaching(bool on)
voidsetFile(string file)Method void QFileInfo::setFile(const QString &file)
voidsetFile(const QFile file)Method void QFileInfo::setFile(const QFile &file)
voidsetFile(const QDir dir,
string file)
Method void QFileInfo::setFile(const QDir &dir, const QString &file)
[const]long longsizeMethod qint64 QFileInfo::size()
[const]stringsuffixMethod QString QFileInfo::suffix()
[const]stringsymLinkTargetMethod QString QFileInfo::symLinkTarget()

Deprecated methods (protected, public, static, non-static and constructors)

voidcreateUse of this method is deprecated. Use _create instead
voiddestroyUse of this method is deprecated. Use _destroy instead
[const]booldestroyed?Use of this method is deprecated. Use _destroyed? instead
[const]boolis_const_object?Use of this method is deprecated. Use _is_const_object? instead

Detailed description

bool !=(const QFileInfo fileinfo)

Description: Method bool QFileInfo::operator!=(const QFileInfo &fileinfo)

[const] bool !=(const QFileInfo fileinfo)

Description: Method bool QFileInfo::operator!=(const QFileInfo &fileinfo)

bool ==(const QFileInfo fileinfo)

Description: Method bool QFileInfo::operator==(const QFileInfo &fileinfo)

[const] bool ==(const QFileInfo fileinfo)

Description: Method bool QFileInfo::operator==(const QFileInfo &fileinfo)

void _assign(const QFileInfo other)

Description: Assigns another object to self

void _create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

void _destroy

Description: Explicitly destroys the object

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

[const] bool _destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

[const] bool _is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

void _manage

Description: Marks the object as managed by the script side.

After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required.

Usually it's not required to call this method. It has been introduced in version 0.24.

void _unmanage

Description: Marks the object as no longer owned by the script side.

Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur.

Usually it's not required to call this method. It has been introduced in version 0.24.

[const] QDir absoluteDir

Description: Method QDir QFileInfo::absoluteDir()

[const] string absoluteFilePath

Description: Method QString QFileInfo::absoluteFilePath()

[const] string absolutePath

Description: Method QString QFileInfo::absolutePath()

QFileInfo assign(const QFileInfo fileinfo)

Description: Method QFileInfo &QFileInfo::operator=(const QFileInfo &fileinfo)

[const] string baseName

Description: Method QString QFileInfo::baseName()

[const] string bundleName

Description: Method QString QFileInfo::bundleName()

[const] bool caching

Description: Method bool QFileInfo::caching()

Python specific notes:

The object exposes a readable attribute 'caching'. This is the getter.

void caching=(bool on)

Description: Method void QFileInfo::setCaching(bool on)

Python specific notes:

The object exposes a writable attribute 'caching'. This is the setter.

[const] string canonicalFilePath

Description: Method QString QFileInfo::canonicalFilePath()

[const] string canonicalPath

Description: Method QString QFileInfo::canonicalPath()

[const] string completeBaseName

Description: Method QString QFileInfo::completeBaseName()

[const] string completeSuffix

Description: Method QString QFileInfo::completeSuffix()

void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

[const] QDateTime created

Description: Method QDateTime QFileInfo::created()

void destroy

Description: Explicitly destroys the object

Use of this method is deprecated. Use _destroy instead

[const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

Use of this method is deprecated. Use _destroyed? instead

void detach

Description: Method void QFileInfo::detach()

[const] QDir dir

Description: Method QDir QFileInfo::dir()

[const] new QFileInfo ptr dup

Description: Creates a copy of self

[const] bool exists

Description: Method bool QFileInfo::exists()

[const] string fileName

Description: Method QString QFileInfo::fileName()

[const] string filePath

Description: Method QString QFileInfo::filePath()

[const] string group

Description: Method QString QFileInfo::group()

[const] unsigned int groupId

Description: Method unsigned int QFileInfo::groupId()

[const] bool isAbsolute?

Description: Method bool QFileInfo::isAbsolute()

[const] bool isBundle?

Description: Method bool QFileInfo::isBundle()

[const] bool isDir?

Description: Method bool QFileInfo::isDir()

[const] bool isExecutable?

Description: Method bool QFileInfo::isExecutable()

[const] bool isFile?

Description: Method bool QFileInfo::isFile()

[const] bool isHidden?

Description: Method bool QFileInfo::isHidden()

[const] bool isReadable?

Description: Method bool QFileInfo::isReadable()

[const] bool isRelative?

Description: Method bool QFileInfo::isRelative()

[const] bool isRoot?

Description: Method bool QFileInfo::isRoot()

[const] bool isSymLink?

Description: Method bool QFileInfo::isSymLink()

[const] bool isWritable?

Description: Method bool QFileInfo::isWritable()

[const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

Use of this method is deprecated. Use _is_const_object? instead

[const] QDateTime lastModified

Description: Method QDateTime QFileInfo::lastModified()

[const] QDateTime lastRead

Description: Method QDateTime QFileInfo::lastRead()

bool makeAbsolute

Description: Method bool QFileInfo::makeAbsolute()

[static] new QFileInfo new

Description: Constructor QFileInfo::QFileInfo()

This method creates an object of class QFileInfo.

Python specific notes:

This method is the default initializer of the object

[static] new QFileInfo new(string file)

Description: Constructor QFileInfo::QFileInfo(const QString &file)

This method creates an object of class QFileInfo.

Python specific notes:

This method is the default initializer of the object

[static] new QFileInfo new(const QFile file)

Description: Constructor QFileInfo::QFileInfo(const QFile &file)

This method creates an object of class QFileInfo.

Python specific notes:

This method is the default initializer of the object

[static] new QFileInfo new(const QDir dir,string file)

Description: Constructor QFileInfo::QFileInfo(const QDir &dir, const QString &file)

This method creates an object of class QFileInfo.

Python specific notes:

This method is the default initializer of the object

[static] new QFileInfo new(const QFileInfo fileinfo)

Description: Constructor QFileInfo::QFileInfo(const QFileInfo &fileinfo)

This method creates an object of class QFileInfo.

Python specific notes:

This method is the default initializer of the object

[const] string owner

Description: Method QString QFileInfo::owner()

[const] unsigned int ownerId

Description: Method unsigned int QFileInfo::ownerId()

[const] string path

Description: Method QString QFileInfo::path()

[const] bool permission(const QFile_QFlags_Permission permissions)

Description: Method bool QFileInfo::permission(QFlags<QFile::Permission> permissions)

[const] QFile_QFlags_Permission permissions

Description: Method QFlags<QFile::Permission> QFileInfo::permissions()

[const] string readLink

Description: Method QString QFileInfo::readLink()

void refresh

Description: Method void QFileInfo::refresh()

void setCaching(bool on)

Description: Method void QFileInfo::setCaching(bool on)

Python specific notes:

The object exposes a writable attribute 'caching'. This is the setter.

void setFile(string file)

Description: Method void QFileInfo::setFile(const QString &file)

void setFile(const QFile file)

Description: Method void QFileInfo::setFile(const QFile &file)

void setFile(const QDir dir,string file)

Description: Method void QFileInfo::setFile(const QDir &dir, const QString &file)

[const] long long size

Description: Method qint64 QFileInfo::size()

Python specific notes:

This method is also available as 'len(object)'

[const] string suffix

Description: Method QString QFileInfo::suffix()

[const] string symLinkTarget

Description: Method QString QFileInfo::symLinkTarget()