Eneboo - Documentación para desarrolladores
Tipos públicos | Métodos públicos | Métodos públicos estáticos
Referencia de la Clase QUrlInfo

The QUrlInfo class stores information about URLs. Más...

#include <qurlinfo.h>

Lista de todos los miembros.

Tipos públicos

enum  PermissionSpec {
  ReadOwner = 00400, WriteOwner = 00200, ExeOwner = 00100, ReadGroup = 00040,
  WriteGroup = 00020, ExeGroup = 00010, ReadOther = 00004, WriteOther = 00002,
  ExeOther = 00001, ReadOwner = 00400, WriteOwner = 00200, ExeOwner = 00100,
  ReadGroup = 00040, WriteGroup = 00020, ExeGroup = 00010, ReadOther = 00004,
  WriteOther = 00002, ExeOther = 00001
}
enum  PermissionSpec {
  ReadOwner = 00400, WriteOwner = 00200, ExeOwner = 00100, ReadGroup = 00040,
  WriteGroup = 00020, ExeGroup = 00010, ReadOther = 00004, WriteOther = 00002,
  ExeOther = 00001, ReadOwner = 00400, WriteOwner = 00200, ExeOwner = 00100,
  ReadGroup = 00040, WriteGroup = 00020, ExeGroup = 00010, ReadOther = 00004,
  WriteOther = 00002, ExeOther = 00001
}

Métodos públicos

 QUrlInfo ()
 QUrlInfo (const QUrlOperator &path, const QString &file)
 QUrlInfo (const QUrlInfo &ui)
 QUrlInfo (const QString &name, int permissions, const QString &owner, const QString &group, uint size, const QDateTime &lastModified, const QDateTime &lastRead, bool isDir, bool isFile, bool isSymLink, bool isWritable, bool isReadable, bool isExecutable)
 QUrlInfo (const QUrl &url, int permissions, const QString &owner, const QString &group, uint size, const QDateTime &lastModified, const QDateTime &lastRead, bool isDir, bool isFile, bool isSymLink, bool isWritable, bool isReadable, bool isExecutable)
QUrlInfooperator= (const QUrlInfo &ui)
virtual ~QUrlInfo ()
virtual void setName (const QString &name)
virtual void setDir (bool b)
virtual void setFile (bool b)
virtual void setSymLink (bool b)
virtual void setOwner (const QString &s)
virtual void setGroup (const QString &s)
virtual void setSize (uint size)
virtual void setWritable (bool b)
virtual void setReadable (bool b)
virtual void setPermissions (int p)
virtual void setLastModified (const QDateTime &dt)
bool isValid () const
QString name () const
int permissions () const
QString owner () const
QString group () const
uint size () const
QDateTime lastModified () const
QDateTime lastRead () const
bool isDir () const
bool isFile () const
bool isSymLink () const
bool isWritable () const
bool isReadable () const
bool isExecutable () const
bool operator== (const QUrlInfo &i) const
 QUrlInfo ()
 QUrlInfo (const QUrlOperator &path, const QString &file)
 QUrlInfo (const QUrlInfo &ui)
 QUrlInfo (const QString &name, int permissions, const QString &owner, const QString &group, uint size, const QDateTime &lastModified, const QDateTime &lastRead, bool isDir, bool isFile, bool isSymLink, bool isWritable, bool isReadable, bool isExecutable)
 QUrlInfo (const QUrl &url, int permissions, const QString &owner, const QString &group, uint size, const QDateTime &lastModified, const QDateTime &lastRead, bool isDir, bool isFile, bool isSymLink, bool isWritable, bool isReadable, bool isExecutable)
QUrlInfooperator= (const QUrlInfo &ui)
virtual ~QUrlInfo ()
virtual void setName (const QString &name)
virtual void setDir (bool b)
virtual void setFile (bool b)
virtual void setSymLink (bool b)
virtual void setOwner (const QString &s)
virtual void setGroup (const QString &s)
virtual void setSize (uint size)
virtual void setWritable (bool b)
virtual void setReadable (bool b)
virtual void setPermissions (int p)
virtual void setLastModified (const QDateTime &dt)
bool isValid () const
QString name () const
int permissions () const
QString owner () const
QString group () const
uint size () const
QDateTime lastModified () const
QDateTime lastRead () const
bool isDir () const
bool isFile () const
bool isSymLink () const
bool isWritable () const
bool isReadable () const
bool isExecutable () const
bool operator== (const QUrlInfo &i) const

Métodos públicos estáticos

static bool greaterThan (const QUrlInfo &i1, const QUrlInfo &i2, int sortBy)
static bool lessThan (const QUrlInfo &i1, const QUrlInfo &i2, int sortBy)
static bool equal (const QUrlInfo &i1, const QUrlInfo &i2, int sortBy)
static bool greaterThan (const QUrlInfo &i1, const QUrlInfo &i2, int sortBy)
static bool lessThan (const QUrlInfo &i1, const QUrlInfo &i2, int sortBy)
static bool equal (const QUrlInfo &i1, const QUrlInfo &i2, int sortBy)

Descripción detallada

The QUrlInfo class stores information about URLs.

This class is just a container for storing information about URLs, which is why all information must be passed in the constructor.

Unless you're reimplementing a network protocol you're unlikely to create QUrlInfo objects yourself, but you may receive QUrlInfo objects from functions, e.g. QUrlOperator::info().

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


Documentación de las enumeraciones miembro de la clase

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

ReadOwner The file is readable by the owner of the file. WriteOwner The file is writable by the owner of the file. ExeOwner The file is executable by the owner of the file. ReadGroup The file is readable by the group. WriteGroup The file is writable by the group. ExeGroup The file is executable by the group. ReadOther The file is readable by anyone. WriteOther The file is writable by anyone. ExeOther The file is executable by anyone.

Valores de enumeraciones:
ReadOwner 
WriteOwner 
ExeOwner 
ReadGroup 
WriteGroup 
ExeGroup 
ReadOther 
WriteOther 
ExeOther 
ReadOwner 
WriteOwner 
ExeOwner 
ReadGroup 
WriteGroup 
ExeGroup 
ReadOther 
WriteOther 
ExeOther 
Valores de enumeraciones:
ReadOwner 
WriteOwner 
ExeOwner 
ReadGroup 
WriteGroup 
ExeGroup 
ReadOther 
WriteOther 
ExeOther 
ReadOwner 
WriteOwner 
ExeOwner 
ReadGroup 
WriteGroup 
ExeGroup 
ReadOther 
WriteOther 
ExeOther 

Documentación del constructor y destructor

QUrlInfo::QUrlInfo ( )

Constructs an invalid QUrlInfo object with default values.

Ver también:
isValid()
QUrlInfo::QUrlInfo ( const QUrlOperator path,
const QString file 
)

Constructs a QUrlInfo object with information about the file file in the path. It tries to find the information about the file in the QUrlOperator path.

If the information is not found, this constructor creates an invalid QUrlInfo, i.e. isValid() returns FALSE. You should always check if the URL info is valid before relying on the return values of any getter functions.

If file is empty, it defaults to the QUrlOperator path, i.e. to the directory.

Ver también:
isValid() QUrlOperator::info()
QUrlInfo::QUrlInfo ( const QUrlInfo ui)

Copy constructor, copies ui to this URL info object.

QUrlInfo::QUrlInfo ( const QString name,
int  permissions,
const QString owner,
const QString group,
uint  size,
const QDateTime lastModified,
const QDateTime lastRead,
bool  isDir,
bool  isFile,
bool  isSymLink,
bool  isWritable,
bool  isReadable,
bool  isExecutable 
)

Constructs a 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.

QUrlInfo::QUrlInfo ( const QUrl url,
int  permissions,
const QString owner,
const QString group,
uint  size,
const QDateTime lastModified,
const QDateTime lastRead,
bool  isDir,
bool  isFile,
bool  isSymLink,
bool  isWritable,
bool  isReadable,
bool  isExecutable 
)

Constructs a 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.

QUrlInfo::~QUrlInfo ( ) [virtual]

Destroys the URL info object.

The QUrlOperator object to which this URL referred (if any) is not affected.

QUrlInfo::QUrlInfo ( )
QUrlInfo::QUrlInfo ( const QUrlOperator path,
const QString file 
)
QUrlInfo::QUrlInfo ( const QUrlInfo ui)
QUrlInfo::QUrlInfo ( const QString name,
int  permissions,
const QString owner,
const QString group,
uint  size,
const QDateTime lastModified,
const QDateTime lastRead,
bool  isDir,
bool  isFile,
bool  isSymLink,
bool  isWritable,
bool  isReadable,
bool  isExecutable 
)
QUrlInfo::QUrlInfo ( const QUrl url,
int  permissions,
const QString owner,
const QString group,
uint  size,
const QDateTime lastModified,
const QDateTime lastRead,
bool  isDir,
bool  isFile,
bool  isSymLink,
bool  isWritable,
bool  isReadable,
bool  isExecutable 
)
virtual QUrlInfo::~QUrlInfo ( ) [virtual]

Documentación de las funciones miembro

bool QUrlInfo::equal ( const QUrlInfo i1,
const QUrlInfo i2,
int  sortBy 
) [static]

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 bool QUrlInfo::equal ( const QUrlInfo i1,
const QUrlInfo i2,
int  sortBy 
) [static]
bool QUrlInfo::greaterThan ( const QUrlInfo i1,
const QUrlInfo i2,
int  sortBy 
) [static]

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.

static bool QUrlInfo::greaterThan ( const QUrlInfo i1,
const QUrlInfo i2,
int  sortBy 
) [static]
QString QUrlInfo::group ( ) const
QString QUrlInfo::group ( ) const

Returns the group of the URL.

Ver también:
isValid()
bool QUrlInfo::isDir ( ) const

Returns TRUE if the URL is a directory; otherwise returns FALSE.

Ver también:
isValid()
bool QUrlInfo::isDir ( ) const
bool QUrlInfo::isExecutable ( ) const

Returns TRUE if the URL is executable; otherwise returns FALSE.

Ver también:
isValid()
bool QUrlInfo::isExecutable ( ) const
bool QUrlInfo::isFile ( ) const

Returns TRUE if the URL is a file; otherwise returns FALSE.

Ver también:
isValid()
bool QUrlInfo::isFile ( ) const
bool QUrlInfo::isReadable ( ) const

Returns TRUE if the URL is readable; otherwise returns FALSE.

Ver también:
isValid()
bool QUrlInfo::isReadable ( ) const
bool QUrlInfo::isSymLink ( ) const

Returns TRUE if the URL is a symbolic link; otherwise returns FALSE.

Ver también:
isValid()
bool QUrlInfo::isSymLink ( ) const
bool QUrlInfo::isValid ( ) const
bool QUrlInfo::isValid ( void  ) const

Returns TRUE if the URL info is valid; otherwise returns FALSE. Valid means that the QUrlInfo contains real information. For example, a call to QUrlOperator::info() might return a an invalid QUrlInfo, if no information about the requested entry is available.

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

bool QUrlInfo::isWritable ( ) const

Returns TRUE if the URL is writable; otherwise returns FALSE.

Ver también:
isValid()
bool QUrlInfo::isWritable ( ) const
QDateTime QUrlInfo::lastModified ( ) const

Returns the last modification date of the URL.

Ver también:
isValid()
QDateTime QUrlInfo::lastModified ( ) const
QDateTime QUrlInfo::lastRead ( ) const

Returns the date when the URL was last read.

Ver también:
isValid()
QDateTime QUrlInfo::lastRead ( ) const
bool QUrlInfo::lessThan ( const QUrlInfo i1,
const QUrlInfo i2,
int  sortBy 
) [static]

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.

static bool QUrlInfo::lessThan ( const QUrlInfo i1,
const QUrlInfo i2,
int  sortBy 
) [static]
QString QUrlInfo::name ( ) const
QString QUrlInfo::name ( ) const

Returns the file name of the URL.

Ver también:
isValid()
QUrlInfo & QUrlInfo::operator= ( const QUrlInfo ui)

Assigns the values of ui to this QUrlInfo object.

QUrlInfo& QUrlInfo::operator= ( const QUrlInfo ui)
bool QUrlInfo::operator== ( const QUrlInfo i) const
bool QUrlInfo::operator== ( const QUrlInfo i) const

Compares this QUrlInfo with i and returns TRUE if they are equal; otherwise returns FALSE.

QString QUrlInfo::owner ( ) const

Returns the owner of the URL.

Ver también:
isValid()
QString QUrlInfo::owner ( ) const
int QUrlInfo::permissions ( ) const
int QUrlInfo::permissions ( ) const

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

Ver también:
isValid()
virtual void QUrlInfo::setDir ( bool  b) [virtual]
void QUrlInfo::setDir ( bool  b) [virtual]

If b is TRUE then the URL is set to be a directory; if 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.

Ver también:
isValid()
void QUrlInfo::setFile ( bool  b) [virtual]

If b is TRUE then the URL is set to be a file; if 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.

Ver también:
isValid()
virtual void QUrlInfo::setFile ( bool  b) [virtual]
virtual void QUrlInfo::setGroup ( const QString s) [virtual]
void QUrlInfo::setGroup ( const QString s) [virtual]

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.

Ver también:
isValid()
virtual void QUrlInfo::setLastModified ( const QDateTime dt) [virtual]
void QUrlInfo::setLastModified ( const QDateTime dt) [virtual]

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.

Ver también:
isValid()
virtual void QUrlInfo::setName ( const QString name) [virtual]
void QUrlInfo::setName ( const QString name) [virtual]

Sets the name of the URL to name. The name is the full text, for example, "http://doc.trolltech.com/qurlinfo.html".

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

Ver también:
isValid()
virtual void QUrlInfo::setOwner ( const QString s) [virtual]
void QUrlInfo::setOwner ( const QString s) [virtual]

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.

Ver también:
isValid()
virtual void QUrlInfo::setPermissions ( int  p) [virtual]
void QUrlInfo::setPermissions ( int  p) [virtual]

Specifies that the URL has access permisions, p.

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

Ver también:
isValid()
virtual void QUrlInfo::setReadable ( bool  b) [virtual]
void QUrlInfo::setReadable ( bool  b) [virtual]

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.

Ver también:
isValid()
virtual void QUrlInfo::setSize ( uint  size) [virtual]
void QUrlInfo::setSize ( uint  size) [virtual]

Specifies the size of the URL.

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

Ver también:
isValid()
void QUrlInfo::setSymLink ( bool  b) [virtual]

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.

Ver también:
isValid()
virtual void QUrlInfo::setSymLink ( bool  b) [virtual]
virtual void QUrlInfo::setWritable ( bool  b) [virtual]
void QUrlInfo::setWritable ( bool  b) [virtual]

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.

Ver también:
isValid()
uint QUrlInfo::size ( ) const
uint QUrlInfo::size ( ) const

Returns the size of the URL.

Ver también:
isValid()

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'