Classes - Annotated - Tree - Functions - Home - Structure

QUrlInfo Class Reference

The QUrlInfo class stores information about URLs. More...

#include <qurlinfo.h>

List of all member functions.

Public Members

Static Public Members


Detailed Description

The QUrlInfo class stores information about URLs.

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


Member Function Documentation

QUrlInfo::QUrlInfo ()

Constructs an empty QUrlInfo object with default values.

QUrlInfo::QUrlInfo ( const QUrlOperator & path, const QString & file )

Constructs a QUrlInfo object with information about the file file in the path. This constructor tries to find the info about file, which should be stored in the QUrlOperator path. If this is not the case, an empty QUrlInfo object is created.

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 information of the URL. The information that is passed is the name, the permissions, the owner and group, as well as the size, lastModified date/time and lastRead date/time. Flags are also passed, namely, 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 information of the URL. The information that is passed is the url, the permissions, the owner and group, as well as the size, lastModified date/time and lastRead date/time. Flags are also passed, namely, isDir, isFile, isSymLink, isWritable, isReadable and isExecutable.

QUrlInfo::~QUrlInfo () [virtual]

Destroys the URL object. Does not touch the object to which this URL referred, of course

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

Returns TRUE if i1 equals to i2, otherwise FALSE. The objects are compared by the value, which is specified by sortBy. This has to be one of QDir::Name, QDir::Time or QDir::Size.

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

Returns TRUE if i1 is greater than i2, otherwise FALSE. The objects are compared by the value, which is specified by sortBy. This has to be one of QDir::Name, QDir::Time or QDir::Size.

QString QUrlInfo::group () const

Returns the group of the URL.

bool QUrlInfo::isDir () const

Returns TRUE if the URL is a directory, otherwise FALSE.

Example: network/networkprotocol/nntp.cpp.

bool QUrlInfo::isExecutable () const

Returns TRUE if the URL is executable, otherwise FALSE.

bool QUrlInfo::isFile () const

Returns TRUE if the URL is a file, otherwise FALSE.

bool QUrlInfo::isReadable () const

Returns TRUE if the URL is readable, otherwise FALSE.

bool QUrlInfo::isSymLink () const

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

bool QUrlInfo::isWritable () const

Returns TRUE if the URL is writable, otherwise FALSE.

QDateTime QUrlInfo::lastModified () const

Returns the last modification date of the URL.

QDateTime QUrlInfo::lastRead () const

Returns the date when the URL was read the last time.

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

Returns TRUE if i1 is less than i2, otherwise FALSE. The objects are compared by the value, which is specified by sortBy. This has to be one of QDir::Name, QDir::Time or QDir::Size.

QString QUrlInfo::name () const

Returns the file name of the URL.

Examples: network/ftpclient/ftpmainwindow.cpp and network/ftpclient/ftpview.cpp.

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

Assigns the values of ui to this QUrlInfo object.

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

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

QString QUrlInfo::owner () const

Returns the owner of the URL.

int QUrlInfo::permissions () const

Returns the permissions of the URL.

void QUrlInfo::setDir ( bool b ) [virtual]

Specifies that the URL refers to a directory if b is TRUE and that it does not if b is FALSE. (Note that a URL can refer both a file and a directory even though most file systems do not support this duality.)

Example: network/networkprotocol/nntp.cpp.

void QUrlInfo::setFile ( bool b ) [virtual]

Specifies that the URL refers to a file if b is TRUE and that it does not if b is FALSE. (Note that a URL can refer both a file and a directory even though most file systems do not support this duality.)

Example: network/networkprotocol/nntp.cpp.

void QUrlInfo::setGroup ( const QString & s ) [virtual]

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

void QUrlInfo::setLastModified ( const QDateTime & dt ) [virtual]

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

void QUrlInfo::setName ( const QString & name ) [virtual]

Sets the name of the URL to name. The name is the full text, for example, "http://www.acc.umu.se/~balp/porno/".

Example: network/networkprotocol/nntp.cpp.

void QUrlInfo::setOwner ( const QString & s ) [virtual]

Specifies that the owner of the URL is called s.

void QUrlInfo::setPermissions ( int p ) [virtual]

Specifies that the URL has access permision p.

void QUrlInfo::setReadable ( bool b ) [virtual]

Specifies that the URL is readable if b is TRUE and not readable if b is FALSE.

Example: network/networkprotocol/nntp.cpp.

void QUrlInfo::setSize ( uint s ) [virtual]

Specifies that the URL has size s.

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.

Example: network/networkprotocol/nntp.cpp.

void QUrlInfo::setWritable ( bool b ) [virtual]

Specifies that the URL is writable if b is TRUE and not writable if b is FALSE.

Example: network/networkprotocol/nntp.cpp.

uint QUrlInfo::size () const

Returns the size of the URL.

Search the documentation, FAQ, qt-interest archive and more (uses www.trolltech.com):


This file is part of the Qt toolkit, copyright © 1995-2001 Trolltech, all rights reserved.


Copyright © 2001 TrolltechTrademarks
Qt version 3.0.0-beta2