📄 qurlinfo.3qt
字号:
'\" t.TH QUrlInfo 3qt "9 December 2002" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS. All rights reserved. See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQUrlInfo \- Stores information about URLs.SH SYNOPSIS\fC#include <qurlinfo.h>\fR.PP.SS "Public Members".in +1c.ti -1c.BI "\fBQUrlInfo\fR ()".br.ti -1c.BI "\fBQUrlInfo\fR ( const QUrlOperator & path, const QString & file )".br.ti -1c.BI "\fBQUrlInfo\fR ( const QUrlInfo & ui )".br.ti -1c.BI "\fBQUrlInfo\fR ( 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 )".br.ti -1c.BI "\fBQUrlInfo\fR ( 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 )".br.ti -1c.BI "QUrlInfo & \fBoperator=\fR ( const QUrlInfo & ui )".br.ti -1c.BI "virtual \fB~QUrlInfo\fR ()".br.ti -1c.BI "virtual void \fBsetName\fR ( const QString & name )".br.ti -1c.BI "virtual void \fBsetDir\fR ( bool b )".br.ti -1c.BI "virtual void \fBsetFile\fR ( bool b )".br.ti -1c.BI "virtual void \fBsetSymLink\fR ( bool b )".br.ti -1c.BI "virtual void \fBsetOwner\fR ( const QString & s )".br.ti -1c.BI "virtual void \fBsetGroup\fR ( const QString & s )".br.ti -1c.BI "virtual void \fBsetSize\fR ( uint size )".br.ti -1c.BI "virtual void \fBsetWritable\fR ( bool b )".br.ti -1c.BI "virtual void \fBsetReadable\fR ( bool b )".br.ti -1c.BI "virtual void \fBsetPermissions\fR ( int p )".br.ti -1c.BI "virtual void \fBsetLastModified\fR ( const QDateTime & dt )".br.ti -1c.BI "bool \fBisValid\fR () const".br.ti -1c.BI "QString \fBname\fR () const".br.ti -1c.BI "int \fBpermissions\fR () const".br.ti -1c.BI "QString \fBowner\fR () const".br.ti -1c.BI "QString \fBgroup\fR () const".br.ti -1c.BI "uint \fBsize\fR () const".br.ti -1c.BI "QDateTime \fBlastModified\fR () const".br.ti -1c.BI "QDateTime \fBlastRead\fR () const".br.ti -1c.BI "bool \fBisDir\fR () const".br.ti -1c.BI "bool \fBisFile\fR () const".br.ti -1c.BI "bool \fBisSymLink\fR () const".br.ti -1c.BI "bool \fBisWritable\fR () const".br.ti -1c.BI "bool \fBisReadable\fR () const".br.ti -1c.BI "bool \fBisExecutable\fR () const".br.ti -1c.BI "bool \fBoperator==\fR ( const QUrlInfo & i ) const".br.in -1c.SS "Static Public Members".in +1c.ti -1c.BI "bool \fBgreaterThan\fR ( const QUrlInfo & i1, const QUrlInfo & i2, int sortBy )".br.ti -1c.BI "bool \fBlessThan\fR ( const QUrlInfo & i1, const QUrlInfo & i2, int sortBy )".br.ti -1c.BI "bool \fBequal\fR ( const QUrlInfo & i1, const QUrlInfo & i2, int sortBy )".br.in -1c.SH DESCRIPTIONThe QUrlInfo class stores information about URLs..PPThis class is just a container for storing information about URLs, which is why all information must be passed in the constructor..PPUnless 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()..PPThe information that can be retrieved includes name(), permissions(), owner(), group(), size(), lastModified(), lastRead(), isDir(), isFile(), isSymLink(), isWritable(), isReadable() and isExecutable()..PPSee also Input/Output and Networking and Miscellaneous Classes..SH MEMBER FUNCTION DOCUMENTATION.SH "QUrlInfo::QUrlInfo ()"Constructs an invalid QUrlInfo object with default values..PPSee also isValid()..SH "QUrlInfo::QUrlInfo ( const QUrlOperator & path, const QString & file )"Constructs a QUrlInfo object with information about the file \fIfile\fR in the \fIpath\fR. It tries to find the information about the \fIfile\fR in the QUrlOperator \fIpath\fR..PPIf 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..PPIf \fIfile\fR is empty, it defaults to the QUrlOperator \fIpath\fR, i.e. to the directory..PPSee also isValid() and QUrlOperator::info()..SH "QUrlInfo::QUrlInfo ( const QUrlInfo & ui )"Copy constructor, copies \fIui\fR to this URL info object..SH "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..PPThe information that is passed is the \fIname\fR, file \fIpermissions\fR, \fIowner\fR and \fIgroup\fR and the file's \fIsize\fR. Also passed is the \fIlastModified\fR date/time and the \fIlastRead\fR date/time. Flags are also passed, specifically, \fIisDir\fR, \fIisFile\fR, \fIisSymLink\fR, \fIisWritable\fR, \fIisReadable\fR and \fIisExecutable\fR..SH "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..PPThe information that is passed is the \fIurl\fR, file \fIpermissions\fR, \fIowner\fR and \fIgroup\fR and the file's \fIsize\fR. Also passed is the \fIlastModified\fR date/time and the \fIlastRead\fR date/time. Flags are also passed, specifically, \fIisDir\fR, \fIisFile\fR, \fIisSymLink\fR, \fIisWritable\fR, \fIisReadable\fR and \fIisExecutable\fR..SH "QUrlInfo::~QUrlInfo ()\fC [virtual]\fR"Destroys the URL info object..PPThe QUrlOperator object to which this URL referred (if any) is not affected..SH "bool QUrlInfo::equal ( const QUrlInfo & i1, const QUrlInfo & i2, int sortBy )\fC [static]\fR"Returns TRUE if \fIi1\fR equals to \fIi2\fR; otherwise returns FALSE. The objects are compared by the value, which is specified by \fIsortBy\fR. This must be one of QDir::Name, QDir::Time or QDir::Size..SH "bool QUrlInfo::greaterThan ( const QUrlInfo & i1, const QUrlInfo & i2, int sortBy )\fC [static]\fR"Returns TRUE if \fIi1\fR is greater than \fIi2\fR; otherwise returns FALSE. The objects are compared by the value, which is specified by \fIsortBy\fR. This must be one of QDir::Name, QDir::Time or QDir::Size..SH "QString QUrlInfo::group () const"Returns the group of the URL..PPSee also isValid()..SH "bool QUrlInfo::isDir () const"Returns TRUE if the URL is a directory; otherwise returns FALSE..PPSee also isValid()..PPExamples:.)l network/ftpclient/ftpmainwindow.ui.h and network/networkprotocol/nntp.cpp..SH "bool QUrlInfo::isExecutable () const"Returns TRUE if the URL is executable; otherwise returns FALSE..PPSee also isValid()..SH "bool QUrlInfo::isFile () const"Returns TRUE if the URL is a file; otherwise returns FALSE..PPSee also isValid()..SH "bool QUrlInfo::isReadable () const"Returns TRUE if the URL is readable; otherwise returns FALSE..PPSee also isValid()..SH "bool QUrlInfo::isSymLink () const"Returns TRUE if the URL is a symbolic link; otherwise returns FALSE..PPSee also isValid()..SH "bool QUrlInfo::isValid () 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..PPYou should always check if the URL info is valid before relying on the values..SH "bool QUrlInfo::isWritable () const"Returns TRUE if the URL is writable; otherwise returns FALSE..PPSee also isValid()..SH "QDateTime QUrlInfo::lastModified () const"Returns the last modification date of the URL..PPSee also isValid()..PPExample: network/ftpclient/ftpmainwindow.ui.h..SH "QDateTime QUrlInfo::lastRead () const"Returns the date when the URL was last read..PPSee also isValid()..SH "bool QUrlInfo::lessThan ( const QUrlInfo & i1, const QUrlInfo & i2, int sortBy )\fC [static]\fR"Returns TRUE if \fIi1\fR is less than \fIi2\fR; otherwise returns FALSE. The objects are compared by the value, which is specified by \fIsortBy\fR. This must be one of QDir::Name, QDir::Time or QDir::Size..SH "QString QUrlInfo::name () const"Returns the file name of the URL..PPSee also isValid()..PPExample: network/ftpclient/ftpmainwindow.ui.h..SH "QUrlInfo & QUrlInfo::operator= ( const QUrlInfo & ui )"Assigns the values of \fIui\fR to this QUrlInfo object..SH "bool QUrlInfo::operator== ( const QUrlInfo & i ) const"Compares this QUrlInfo with \fIi\fR and returns TRUE if they are equal; otherwise returns FALSE..SH "QString QUrlInfo::owner () const"Returns the owner of the URL..PPSee also isValid()..SH "int QUrlInfo::permissions () const"Returns the permissions of the URL..PPSee also isValid()..SH "void QUrlInfo::setDir ( bool b )\fC [virtual]\fR"If \fIb\fR 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.).PPIf you call this function for an invalid URL info, this function turns it into a valid one..PPSee also isValid()..PPExample: network/networkprotocol/nntp.cpp..SH "void QUrlInfo::setFile ( bool b )\fC [virtual]\fR"If \fIb\fR 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.).PPIf you call this function for an invalid URL info, this function turns it into a valid one..PPSee also isValid()..PPExample: network/networkprotocol/nntp.cpp..SH "void QUrlInfo::setGroup ( const QString & s )\fC [virtual]\fR"Specifies that the owning group of the URL is called \fIs\fR..PPIf you call this function for an invalid URL info, this function turns it into a valid one..PPSee also isValid()..SH "void QUrlInfo::setLastModified ( const QDateTime & dt )\fC [virtual]\fR"Specifies that the object the URL refers to was last modified at \fIdt\fR..PPIf you call this function for an invalid URL info, this function turns it into a valid one..PPSee also isValid()..SH "void QUrlInfo::setName ( const QString & name )\fC [virtual]\fR"Sets the name of the URL to \fIname\fR. The name is the full text, for example, "http://doc.trolltech.com/qurlinfo.html"..PPIf you call this function for an invalid URL info, this function turns it into a valid one..PPSee also isValid()..PPExample: network/networkprotocol/nntp.cpp..SH "void QUrlInfo::setOwner ( const QString & s )\fC [virtual]\fR"Specifies that the owner of the URL is called \fIs\fR..PPIf you call this function for an invalid URL info, this function turns it into a valid one..PPSee also isValid()..SH "void QUrlInfo::setPermissions ( int p )\fC [virtual]\fR"Specifies that the URL has access permisions, \fIp\fR..PPIf you call this function for an invalid URL info, this function turns it into a valid one..PPSee also isValid()..SH "void QUrlInfo::setReadable ( bool b )\fC [virtual]\fR"Specifies that the URL is readable if \fIb\fR is TRUE and not readable if \fIb\fR is FALSE..PPIf you call this function for an invalid URL info, this function turns it into a valid one..PPSee also isValid()..PPExample: network/networkprotocol/nntp.cpp..SH "void QUrlInfo::setSize ( uint size )\fC [virtual]\fR"Specifies the \fIsize\fR of the URL..PPIf you call this function for an invalid URL info, this function turns it into a valid one..PPSee also isValid()..SH "void QUrlInfo::setSymLink ( bool b )\fC [virtual]\fR"Specifies that the URL refers to a symbolic link if \fIb\fR is TRUE and that it does not if \fIb\fR is FALSE..PPIf you call this function for an invalid URL info, this function turns it into a valid one..PPSee also isValid()..PPExample: network/networkprotocol/nntp.cpp..SH "void QUrlInfo::setWritable ( bool b )\fC [virtual]\fR"Specifies that the URL is writable if \fIb\fR is TRUE and not writable if \fIb\fR is FALSE..PPIf you call this function for an invalid URL info, this function turns it into a valid one..PPSee also isValid()..PPExample: network/networkprotocol/nntp.cpp..SH "uint QUrlInfo::size () const"Returns the size of the URL..PPSee also isValid()..PPExample: network/ftpclient/ftpmainwindow.ui.h..SH "SEE ALSO".BR http://doc.trolltech.com/qurlinfo.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com. See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qurlinfo.3qt) and the Qtversion (3.1.1).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -