KIO
kfileitem.h
33 * KFileItem is implicitly shared, i.e. it can be used as a value and copied around at almost no cost.
104 * @param itemOrDirUrl the URL of the item or of the directory containing this item (see urlIsDirectory).
114 KFileItem(const KIO::UDSEntry &entry, const QUrl &itemOrDirUrl, bool delayedMimeTypes = false, bool urlIsDirectory = false);
122 explicit KFileItem(const QUrl &url, const QString &mimeType = QString(), mode_t mode = KFileItem::Unknown);
KFileItem findByUrl(const QUrl &url) const
Find a KFileItem by URL and return it.
Definition kfileitem.cpp:1885
KFileItem findByName(const QString &fileName) const
Find a KFileItem by name and return it.
Definition kfileitem.cpp:1876
QUrl mostLocalUrl(bool *local=nullptr) const
Tries to return a local URL for this file item if possible.
Definition kfileitem.cpp:1587
bool operator==(const KFileItem &other) const
Returns true if both items share the same URL.
Definition kfileitem.cpp:1520
bool operator!=(const KFileItem &other) const
Returns true if both items do not share the same URL.
Definition kfileitem.cpp:1533
Q_INVOKABLE QString timeString(KFileItem::FileTimes which=ModificationTime) const
Requests the modification, access or creation time as a string, depending on which.
Definition kfileitem.cpp:1578
Q_INVOKABLE QDateTime time(KFileItem::FileTimes which) const
Requests the modification, access or creation time, depending on which.
Definition kfileitem.cpp:871
bool cmp(const KFileItem &item) const
Somewhat like a comparison operator, but more explicit, and it can detect that two fileitems differ i...
Definition kfileitem.cpp:1507
bool hasExtendedACL() const
Tells if the file has extended access level information ( Posix ACL )
Definition kfileitem.cpp:828
KACL defaultACL() const
Returns the default access control list for the directory.
Definition kfileitem.cpp:856
mode_t permissions() const
Returns the permissions of the file (stat.st_mode containing only permissions).
Definition kfileitem.cpp:1670
KIO::filesize_t recursiveSize() const
For folders, its recursive size: the size of its files plus the recursiveSize of its folder.
Definition kfileitem.cpp:819
QString suffix() const
Returns the file extension Similar to QFileInfo::suffix except it takes into account UDS_DISPLAY_NAME...
Definition kfileitem.cpp:1932
mode_t mode() const
Returns the file type (stat.st_mode containing only S_IFDIR, S_IFLNK, ...).
Definition kfileitem.cpp:1681
QString permissionsString() const
Returns the access permissions for the file as a string.
Definition kfileitem.cpp:1562
void setLocalPath(const QString &path)
Sets the item's local path (UDS_LOCAL_PATH).
Definition kfileitem.cpp:703
void setDelayedMimeTypes(bool b)
Sets MIME type determination to be immediate or on demand.
Definition kfileitem.cpp:684
void refresh()
Throw away and re-read (for local files) all information about the file.
Definition kfileitem.cpp:647
bool operator<(const KFileItem &other) const
Returns true if this item's URL is lexically less than other's URL; otherwise returns false.
Definition kfileitem.cpp:1538
void setName(const QString &name)
Sets the item's name (i.e. the filename).
Definition kfileitem.cpp:713
QList()
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:49:36 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:49:36 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.