QUrlInfo(3qt)
π QUrlInfo(3qt) π
okay so bestie, welcome to QUrlInfo(3qt), which is the glow-up manual page for the QUrlInfo class. it's giving "container of URL facts", it's giving "you probably didn't ask for this but here we are". no cap, let's get into it. π
β¨ NAME β¨
QUrlInfo β Stores information about URLs
π¦ SYNOPSIS π¦
#include <qurlinfo.h>
π Public Members
enum PermissionSpec { ReadOwner = 00400, WriteOwner = 00200, ExeOwner =
00100, ReadGroup = 00040, WriteGroup = 00020, ExeGroup = 00010,
ReadOther = 00004, WriteOther = 00002, ExeOther = 00001 }
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 )
QUrlInfo & operator= ( 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
β Static Public Members
bool greaterThan ( const QUrlInfo & i1, const QUrlInfo & i2, int sortBy )
bool lessThan ( const QUrlInfo & i1, const QUrlInfo & i2, int sortBy )
bool equal ( const QUrlInfo & i1, const QUrlInfo & i2, int sortBy )
π DESCRIPTION π
The QUrlInfo class stores information about URLs. that's the whole assignment, she's a vessel, she's a keeper of secrets. π«Ά
This class is just a container for storing information about URLs β which is exactly why all the information must be passed in the constructor. no sneaky defaults, no "we'll figure it out later". you hand her everything up front or nothing at all.
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(). so like, you don't make the friendship bracelet, somebody else hands it to you. π
The information that can be retrieved includes name(), permissions(), owner(), group(), size(), lastModified(), lastRead(), isDir(), isFile(), isSymLink(), isWritable(), isReadable() and isExecutable(). a whole lil roster, honestly. π
See also Input/Output and Networking and Miscellaneous Classes.
π Member Type Documentation
QUrlInfo::PermissionSpec
This enum is used by the permissions() function to report the permissions of a file. it's the vibe check for who's allowed to touch what. π
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.
π₯ MEMBER FUNCTION DOCUMENTATION π₯
QUrlInfo::QUrlInfo ()
Constructs an invalid QUrlInfo object with default values. yeah bestie, she starts out unformed, a blank slate, an empty playlist. π
See also 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. like fr fr, do not skip the vibe check. π¨
If file is empty, it defaults to the QUrlOperator path, i.e. to the directory.
See also isValid() and QUrlOperator::info().
QUrlInfo::QUrlInfo ( const QUrlInfo & ui )
Copy constructor, copies ui to this URL info object. twin energy, no notes. π―
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 full info dump, the whole lore drop. π
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. same energy, different first arg β she took the QUrl route this time. β¨
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. she's logging off, closing the app, going to bed. π΄
The QUrlOperator object to which this URL referred (if any) is not affected. so don't worry, the operator survives. she's fine, she's thriving.
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. pick your metric, bestie, but pick from those three only. π―
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. who's the main character here, i1 or i2? π
QString QUrlInfo::group () const
Returns the group of the URL. the squad, the crew, the group chat she belongs to. π«
See also isValid().
bool QUrlInfo::isDir () const
Returns TRUE if the URL is a directory; otherwise returns FALSE. is she a folder? iconic either way. π
See also isValid().
Examples:
that's genuinely it, bestie β the original page just says "Examples:" and then nothing. the list is empty. i'm not making anything up, i'm just telling you what's on the page. π
bool QUrlInfo::isExecutable () const
Returns TRUE if the URL is executable; otherwise returns FALSE. can she run? can she go? πββοΈ
See also isValid().
bool QUrlInfo::isFile () const
Returns TRUE if the URL is a file; otherwise returns FALSE. a whole document, a whole artifact. π
See also isValid().
bool QUrlInfo::isReadable () const
Returns TRUE if the URL is readable; otherwise returns FALSE. can we read her diary or not. π
See also isValid().
bool QUrlInfo::isSymLink () const
Returns TRUE if the URL is a symbolic link; otherwise returns FALSE. she's pointing at somebody else and pretending it's her whole personality. π
See also isValid().
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.
You should always check if the URL info is valid before relying on the values. this is the rule, this is the law, this is the moment. β
bool QUrlInfo::isWritable () const
Returns TRUE if the URL is writable; otherwise returns FALSE. can we edit her, or is she read-only about it. βοΈ
See also isValid().
QDateTime QUrlInfo::lastModified () const
Returns the last modification date of the URL. her last glow-up timestamp. π
See also isValid().
Example: network/ftpclient/ftpmainwindow.ui.h.
QDateTime QUrlInfo::lastRead () const
Returns the date when the URL was last read. when was the last time somebody actually opened her up. π
See also isValid().
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. same three options, no fourth one hiding in the back. π
QString QUrlInfo::name () const
Returns the file name of the URL. her government name, her whole identity. πΈ
See also isValid().
Example: network/ftpclient/ftpmainwindow.ui.h.
QUrlInfo & QUrlInfo::operator= ( const QUrlInfo & ui )
Assigns the values of ui to this QUrlInfo object. she's copying the whole fit, head to toe. π
bool QUrlInfo::operator== ( const QUrlInfo & i ) const
Compares this QUrlInfo with i and returns TRUE if they are equal; otherwise returns FALSE. are they the same person or just wearing the same outfit. π€
QString QUrlInfo::owner () const
Returns the owner of the URL. whose name is on the lease. π
See also isValid().
int QUrlInfo::permissions () const
Returns the permissions of the URL. You can use the PermissionSpec flags to test for certain permissions. the receipts of who's allowed in and who is not. π§Ύ
See also isValid().
void QUrlInfo::setDir ( bool b ) [virtual]
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.) she can be both, she contains multitudes. π¦
If you call this function for an invalid URL info, this function turns it into a valid one. glow-up via setter, we love to see it. β¨
See also isValid().
Example: network/networkprotocol/nntp.cpp.
void QUrlInfo::setFile ( bool b ) [virtual]
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.) same dual-threat situation, different direction. π«
If you call this function for an invalid URL info, this function turns it into a valid one.
See also isValid().
Example: network/networkprotocol/nntp.cpp.
void QUrlInfo::setGroup ( const QString & s ) [virtual]
Specifies that the owning group of the URL is called s. naming the whole squad, one setter at a time. π«Ά
If you call this function for an invalid URL info, this function turns it into a valid one.
See also isValid().
void QUrlInfo::setLastModified ( const QDateTime & dt ) [virtual]
Specifies that the object the URL refers to was last modified at dt. stamping the glow-up date on the calendar. ποΈ
If you call this function for an invalid URL info, this function turns it into a valid one.
See also isValid().
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". the whole thing, not a nickname, not a shortened version. π
If you call this function for an invalid URL info, this function turns it into a valid one.
See also isValid().
Example: network/networkprotocol/nntp.cpp.
void QUrlInfo::setOwner ( const QString & s ) [virtual]
Specifies that the owner of the URL is called s. putting a name on the deed. π
If you call this function for an invalid URL info, this function turns it into a valid one.
See also isValid().
void QUrlInfo::setPermissions ( int p ) [virtual]β bestie this one tells the URL "hey, your access permisions arep" π (yes, the original spells it permisions, we keep it exactly like that, no editing the queen's typo).
And here's the lil magic trick β¨: if you call this on an invalid URL info, this function turns it into a valid one. Glow-up arc fr fr.
See also isValid().
void QUrlInfo::setReadable ( bool b ) [virtual]β says the URL is readable whenbisTRUE, and not readable whenbisFALSE. That's it, that's the whole vibe π«Ά
Also: call it on an invalid URL info and boom π₯ it becomes valid.
See also isValid().
Example: network/networkprotocol/nntp.cpp.
void QUrlInfo::setSize ( uint size ) [virtual]β sets the size of the URL, obviously, that's the assignment bestie π
And yep, same as the others: calling this on an invalid URL info makes it valid. Validify-ing era π
See also isValid().
void QUrlInfo::setSymLink ( bool b ) [virtual]β tells everyone the URL refers to a symbolic link whenbisTRUE, and that it does not whenbisFALSE. Symbolic link reveal πβ¨
Invalid URL info in? Valid URL info out. Periodt.
See also isValid().
Example: network/networkprotocol/nntp.cpp.
void QUrlInfo::setWritable ( bool b ) [virtual]β says the URL is writable ifbisTRUEand not writable ifbisFALSE. Write-permission main character energy π
And the classic: invalid URL info gets turned valid by this call. Slay.
See also isValid().
Example: network/networkprotocol/nntp.cpp.
uint QUrlInfo::size () constβ returns the size of the URL, no notes π the getter tosetSize()'s setter, iykyk.
See also isValid().
Example: network/ftpclient/ftpmainwindow.ui.h.
π SEE ALSO π
π COPYRIGHT π
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. β¨
π AUTHOR π
Generated automatically from the source code. (Not me writing my memoirs, the source code did it π iconic behaviour honestly.)
π BUGS π
Found a bug in Qt? Bestie, report it like they describe at http://doc.trolltech.com/bughowto.html. Good bug reports help us help you. Thank you π«Ά (and that's a genuine thank you, not a passive-aggressive one, promise).
The definitive Qt documentation is the HTML format one β it lives at $QTDIR/doc/html and you can read it with Qt Assistant or just a web browser πΈ This man page is provided as a convenience for those who prefer man pages, even though this format is not officially supported by Trolltech. (So like, we're the fun unofficial version. Respect it.)
If you find errors in this manual page, report them to qt-bugs@trolltech.com π§ and please include the name of the manual page (qurlinfo.3qt) and the Qt version (3.3.8). That's the assignment, don't skip it π
okay that's the whole page bestie, we ate and left no crumbs π This one's from Trolltech AS, dated 2 February 2007, and it's QUrlInfo(3qt) β go forth and inspect your URLs with confidence, mwah πβ¨π¦
π¦ where this page comes from
- fedora 43: qt3-devel-docs 3.3.8b-102.fc43 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- fedora 44: qt3-devel-docs 3.3.8b-103.fc44 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms