QUrlInfo

Synopsis

Functions

Virtual functions

Static functions

Detailed Description

The PySide.QtNetwork.QUrlInfo class stores information about URLs.

The information about a URL that can be retrieved includes PySide.QtNetwork.QUrlInfo.name() , PySide.QtNetwork.QUrlInfo.permissions() , PySide.QtNetwork.QUrlInfo.owner() , PySide.QtNetwork.QUrlInfo.group() , PySide.QtNetwork.QUrlInfo.size() , PySide.QtNetwork.QUrlInfo.lastModified() , PySide.QtNetwork.QUrlInfo.lastRead() , PySide.QtNetwork.QUrlInfo.isDir() , PySide.QtNetwork.QUrlInfo.isFile() , PySide.QtNetwork.QUrlInfo.isSymLink() , PySide.QtNetwork.QUrlInfo.isWritable() , PySide.QtNetwork.QUrlInfo.isReadable() and PySide.QtNetwork.QUrlInfo.isExecutable() .

You can create your own PySide.QtNetwork.QUrlInfo objects passing in all the relevant information in the constructor, and you can modify a PySide.QtNetwork.QUrlInfo ; for each getter mentioned above there is an equivalent setter. Note that setting values does not affect the underlying resource that the PySide.QtNetwork.QUrlInfo provides information about; for example if you call setWritable(true) on a read-only resource the only thing changed is the PySide.QtNetwork.QUrlInfo object, not the resource.

See also

PySide.QtCore.QUrl FTP Example

class PySide.QtNetwork.QUrlInfo
class PySide.QtNetwork.QUrlInfo(name, permissions, owner, group, size, lastModified, lastRead, isDir, isFile, isSymLink, isWritable, isReadable, isExecutable)
class PySide.QtNetwork.QUrlInfo(url, permissions, owner, group, size, lastModified, lastRead, isDir, isFile, isSymLink, isWritable, isReadable, isExecutable)
class PySide.QtNetwork.QUrlInfo(ui)
Parameters:
  • sizePySide.QtCore.qint64
  • isFilePySide.QtCore.bool
  • lastReadPySide.QtCore.QDateTime
  • isExecutablePySide.QtCore.bool
  • uiPySide.QtNetwork.QUrlInfo
  • permissionsPySide.QtCore.int
  • isWritablePySide.QtCore.bool
  • isSymLinkPySide.QtCore.bool
  • urlPySide.QtCore.QUrl
  • group – unicode
  • name – unicode
  • owner – unicode
  • isReadablePySide.QtCore.bool
  • lastModifiedPySide.QtCore.QDateTime
  • isDirPySide.QtCore.bool

Constructs an invalid PySide.QtNetwork.QUrlInfo object with default values.

Constructs a PySide.QtNetwork.QUrlInfo object by specifying all the URL’s information.

The information that is passed is the name , file permissions , owner and group and the file’s size . Also passed is the lastModified date/time and the lastRead date/time. Flags are also passed, specifically, isDir , isFile , isSymLink , isWritable , isReadable and isExecutable .

Constructs a PySide.QtNetwork.QUrlInfo object by specifying all the URL’s information.

The information that is passed is the url , file permissions , owner and group and the file’s size . Also passed is the lastModified date/time and the lastRead date/time. Flags are also passed, specifically, isDir , isFile , isSymLink , isWritable , isReadable and isExecutable .

Copy constructor, copies ui to this URL info object.

PySide.QtNetwork.QUrlInfo.PermissionSpec

This enum is used by the PySide.QtNetwork.QUrlInfo.permissions() function to report the permissions of a file.

Constant Description
QUrlInfo.ReadOwner The file is readable by the owner of the file.
QUrlInfo.WriteOwner The file is writable by the owner of the file.
QUrlInfo.ExeOwner The file is executable by the owner of the file.
QUrlInfo.ReadGroup The file is readable by the group.
QUrlInfo.WriteGroup The file is writable by the group.
QUrlInfo.ExeGroup The file is executable by the group.
QUrlInfo.ReadOther The file is readable by anyone.
QUrlInfo.WriteOther The file is writable by anyone.
QUrlInfo.ExeOther The file is executable by anyone.
static PySide.QtNetwork.QUrlInfo.equal(i1, i2, sortBy)
Parameters:
Return type:

PySide.QtCore.bool

Returns true if i1 equals to i2 ; otherwise returns false. The objects are compared by the value, which is specified by sortBy . This must be one of QDir.Name , QDir.Time or QDir.Size .

static PySide.QtNetwork.QUrlInfo.greaterThan(i1, i2, sortBy)
Parameters:
Return type:

PySide.QtCore.bool

Returns true if i1 is greater than i2 ; otherwise returns false. The objects are compared by the value, which is specified by sortBy . This must be one of QDir.Name , QDir.Time or QDir.Size .

PySide.QtNetwork.QUrlInfo.group()
Return type:unicode

Returns the group of the URL.

PySide.QtNetwork.QUrlInfo.isDir()
Return type:PySide.QtCore.bool

Returns true if the URL is a directory; otherwise returns false.

PySide.QtNetwork.QUrlInfo.isExecutable()
Return type:PySide.QtCore.bool

Returns true if the URL is executable; otherwise returns false.

PySide.QtNetwork.QUrlInfo.isFile()
Return type:PySide.QtCore.bool

Returns true if the URL is a file; otherwise returns false.

PySide.QtNetwork.QUrlInfo.isReadable()
Return type:PySide.QtCore.bool

Returns true if the URL is readable; otherwise returns false.

Return type:PySide.QtCore.bool

Returns true if the URL is a symbolic link; otherwise returns false.

PySide.QtNetwork.QUrlInfo.isValid()
Return type:PySide.QtCore.bool

Returns true if the URL info is valid; otherwise returns false. Valid means that the PySide.QtNetwork.QUrlInfo contains real information.

You should always check if the URL info is valid before relying on the values.

PySide.QtNetwork.QUrlInfo.isWritable()
Return type:PySide.QtCore.bool

Returns true if the URL is writable; otherwise returns false.

PySide.QtNetwork.QUrlInfo.lastModified()
Return type:PySide.QtCore.QDateTime

Returns the last modification date of the URL.

PySide.QtNetwork.QUrlInfo.lastRead()
Return type:PySide.QtCore.QDateTime

Returns the date when the URL was last read.

static PySide.QtNetwork.QUrlInfo.lessThan(i1, i2, sortBy)
Parameters:
Return type:

PySide.QtCore.bool

Returns true if i1 is less than i2 ; otherwise returns false. The objects are compared by the value, which is specified by sortBy . This must be one of QDir.Name , QDir.Time or QDir.Size .

PySide.QtNetwork.QUrlInfo.name()
Return type:unicode

Returns the file name of the URL.

PySide.QtNetwork.QUrlInfo.__ne__(i)
Parameters:iPySide.QtNetwork.QUrlInfo
Return type:PySide.QtCore.bool

Returns true if this PySide.QtNetwork.QUrlInfo is not equal to other ; otherwise returns false.

PySide.QtNetwork.QUrlInfo.__eq__(i)
Parameters:iPySide.QtNetwork.QUrlInfo
Return type:PySide.QtCore.bool

Returns true if this PySide.QtNetwork.QUrlInfo is equal to other ; otherwise returns false.

PySide.QtNetwork.QUrlInfo.owner()
Return type:unicode

Returns the owner of the URL.

PySide.QtNetwork.QUrlInfo.permissions()
Return type:PySide.QtCore.int

Returns the permissions of the URL. You can use the PermissionSpec flags to test for certain permissions.

PySide.QtNetwork.QUrlInfo.setDir(b)
Parameters:bPySide.QtCore.bool

If b is true then the URL is set to be a directory; if b is false then the URL is set not to be a directory (which normally means it is a file). (Note that a URL can refer to both a file and a directory even though most file systems do not support this.)

If you call this function for an invalid URL info, this function turns it into a valid one.

PySide.QtNetwork.QUrlInfo.setFile(b)
Parameters:bPySide.QtCore.bool

If b is true then the URL is set to be a file; if b is false then the URL is set not to be a file (which normally means it is a directory). (Note that a URL can refer to both a file and a directory even though most file systems do not support this.)

If you call this function for an invalid URL info, this function turns it into a valid one.

PySide.QtNetwork.QUrlInfo.setGroup(s)
Parameters:s – unicode

Specifies that the owning group of the URL is called s .

If you call this function for an invalid URL info, this function turns it into a valid one.

PySide.QtNetwork.QUrlInfo.setLastModified(dt)
Parameters:dtPySide.QtCore.QDateTime

Specifies that the object the URL refers to was last modified at dt .

If you call this function for an invalid URL info, this function turns it into a valid one.

PySide.QtNetwork.QUrlInfo.setLastRead(dt)
Parameters:dtPySide.QtCore.QDateTime

Specifies that the object the URL refers to was last read at dt .

If you call this function for an invalid URL info, this function turns it into a valid one.

PySide.QtNetwork.QUrlInfo.setName(name)
Parameters:name – unicode

Sets the name of the URL to name . The name is the full text, for example, “http://qt.nokia.com/doc/qurlinfo.html”.

If you call this function for an invalid URL info, this function turns it into a valid one.

PySide.QtNetwork.QUrlInfo.setOwner(s)
Parameters:s – unicode

Specifies that the owner of the URL is called s .

If you call this function for an invalid URL info, this function turns it into a valid one.

PySide.QtNetwork.QUrlInfo.setPermissions(p)
Parameters:pPySide.QtCore.int

Specifies that the URL has access permissions p .

If you call this function for an invalid URL info, this function turns it into a valid one.

PySide.QtNetwork.QUrlInfo.setReadable(b)
Parameters:bPySide.QtCore.bool

Specifies that the URL is readable if b is true and not readable if b is false.

If you call this function for an invalid URL info, this function turns it into a valid one.

PySide.QtNetwork.QUrlInfo.setSize(size)
Parameters:sizePySide.QtCore.qint64

Specifies the size of the URL.

If you call this function for an invalid URL info, this function turns it into a valid one.

Parameters:bPySide.QtCore.bool

Specifies that the URL refers to a symbolic link if b is true and that it does not if b is false.

If you call this function for an invalid URL info, this function turns it into a valid one.

PySide.QtNetwork.QUrlInfo.setWritable(b)
Parameters:bPySide.QtCore.bool

Specifies that the URL is writable if b is true and not writable if b is false.

If you call this function for an invalid URL info, this function turns it into a valid one.

PySide.QtNetwork.QUrlInfo.size()
Return type:PySide.QtCore.qint64

Returns the size of the URL.