File indexing completed on 2024-04-28 15:26:24

0001 /*
0002     This file is part of the KDE project
0003     SPDX-FileCopyrightText: 1999-2006 David Faure <faure@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #ifndef KFILEITEM_H
0009 #define KFILEITEM_H
0010 
0011 #include "kiocore_export.h"
0012 #include <QDateTime>
0013 #include <QFile>
0014 #include <QUrl>
0015 #include <kacl.h>
0016 #include <kio/global.h>
0017 #include <kio/udsentry.h>
0018 
0019 #include <QList>
0020 #include <QMimeType>
0021 #include <qplatformdefs.h>
0022 
0023 class KFileItemPrivate;
0024 
0025 /**
0026  * @class KFileItem kfileitem.h <KFileItem>
0027  *
0028  * A KFileItem is a generic class to handle a file, local or remote.
0029  * In particular, it makes it easier to handle the result of KIO::listDir
0030  * (UDSEntry isn't very friendly to use).
0031  * It includes many file attributes such as MIME type, icon, text, mode, link...
0032  *
0033  * KFileItem is implicitly shared, i.e. it can be used as a value and copied around at almost no cost.
0034  */
0035 class KIOCORE_EXPORT KFileItem
0036 {
0037     Q_GADGET
0038 
0039     Q_PROPERTY(QUrl url READ url WRITE setUrl)
0040     Q_PROPERTY(QString user READ user)
0041     Q_PROPERTY(QString group READ group)
0042     Q_PROPERTY(bool isLink READ isLink)
0043     Q_PROPERTY(bool isDir READ isDir)
0044     Q_PROPERTY(bool isFile READ isFile)
0045     Q_PROPERTY(bool isReadable READ isReadable)
0046     Q_PROPERTY(bool isWritable READ isWritable)
0047     Q_PROPERTY(bool isHidden READ isHidden)
0048     Q_PROPERTY(bool isSlow READ isSlow)
0049     Q_PROPERTY(bool isDesktopFile READ isDesktopFile)
0050     Q_PROPERTY(QString linkDest READ linkDest)
0051     Q_PROPERTY(QUrl targetUrl READ targetUrl)
0052     Q_PROPERTY(QString localPath READ localPath WRITE setLocalPath)
0053     Q_PROPERTY(bool isLocalFile READ isLocalFile)
0054     Q_PROPERTY(QString text READ text)
0055     Q_PROPERTY(QString name READ name WRITE setName)
0056     Q_PROPERTY(QString mimetype READ mimetype)
0057     Q_PROPERTY(QMimeType determineMimeType READ determineMimeType)
0058     Q_PROPERTY(QMimeType currentMimeType READ currentMimeType)
0059     Q_PROPERTY(bool isFinalIconKnown READ isFinalIconKnown)
0060     Q_PROPERTY(bool isMimeTypeKnown READ isMimeTypeKnown)
0061     Q_PROPERTY(QString mimeComment READ mimeComment)
0062     Q_PROPERTY(QString iconName READ iconName)
0063     Q_PROPERTY(QStringList overlays READ overlays)
0064     Q_PROPERTY(QString comment READ comment)
0065     Q_PROPERTY(QString getStatusBarInfo READ getStatusBarInfo)
0066     Q_PROPERTY(bool isRegularFile READ isRegularFile)
0067 
0068 public:
0069     enum { Unknown = static_cast<mode_t>(-1) };
0070 
0071     /**
0072      * The timestamps associated with a file.
0073      * - ModificationTime: the time the file's contents were last modified
0074      * - AccessTime: the time the file was last accessed (last read or written to)
0075      * - CreationTime: the time the file was created
0076      */
0077     enum FileTimes {
0078         // warning: don't change without looking at the Private class
0079         ModificationTime = 0,
0080         AccessTime = 1,
0081         CreationTime = 2,
0082         // ChangeTime
0083     };
0084     Q_ENUM(FileTimes)
0085 
0086     enum MimeTypeDetermination {
0087         NormalMimeTypeDetermination = 0,
0088         SkipMimeTypeFromContent,
0089     };
0090     Q_ENUM(MimeTypeDetermination)
0091 
0092     /**
0093      * Null KFileItem. Doesn't represent any file, only exists for convenience.
0094      */
0095     KFileItem();
0096 
0097     /**
0098      * Creates an item representing a file, from a UDSEntry.
0099      * This is the preferred constructor when using KIO::listDir().
0100      *
0101      * @param entry the KIO entry used to get the file, contains info about it
0102      * @param itemOrDirUrl the URL of the item or of the directory containing this item (see urlIsDirectory).
0103      * @param delayedMimeTypes specifies if the MIME type of the given
0104      *       URL should be determined immediately or on demand.
0105      *       See the bool delayedMimeTypes in the KDirLister constructor.
0106      * @param urlIsDirectory specifies if the url is just the directory of the
0107      *       fileitem and the filename from the UDSEntry should be used.
0108      *
0109      * When creating KFileItems out of the UDSEntry emitted by a KIO list job,
0110      * use KFileItem(entry, listjob->url(), delayedMimeTypes, true);
0111      */
0112     KFileItem(const KIO::UDSEntry &entry, const QUrl &itemOrDirUrl, bool delayedMimeTypes = false, bool urlIsDirectory = false);
0113 
0114 #if KIOCORE_ENABLE_DEPRECATED_SINCE(5, 0)
0115     /**
0116      * Creates an item representing a file, from all the necessary info for it.
0117      * @param mode the file mode (according to stat() (e.g. S_IFDIR...)
0118      * Set to KFileItem::Unknown if unknown. For local files, KFileItem will use stat().
0119      * @param permissions the access permissions
0120      * If you set both the mode and the permissions, you save a ::stat() for
0121      * local files.
0122      * Set to KFileItem::Unknown if you don't know the mode or the permission.
0123      * @param url the file url
0124      *
0125      * @param delayedMimeTypes specify if the MIME type of the given URL
0126      *       should be determined immediately or on demand
0127      * @deprecated since 5.0. Most callers gave Unknown for mode and permissions,
0128      * so just port to KFileItem(url) and setDelayedMimeTypes(true) if necessary.
0129      */
0130     KIOCORE_DEPRECATED_VERSION(5, 0, "See API docs")
0131     KFileItem(mode_t mode, mode_t permissions, const QUrl &url, bool delayedMimeTypes = false);
0132 #endif
0133 
0134     /**
0135      * Creates an item representing a file, for which the MIME type is already known.
0136      * @param url the file url
0137      * @param mimeType the name of the file's MIME type
0138      * @param mode the mode (S_IFDIR...)
0139      */
0140     KFileItem(const QUrl &url, const QString &mimeType = QString(), mode_t mode = KFileItem::Unknown); // KF6 TODO: explicit!
0141 
0142     /**
0143      * Creates an item representing a file, with the option of skipping MIME type determination.
0144      * @param url the file url
0145      * @param mimeTypeDetermination the mode of determining the MIME type:
0146      *       NormalMimeTypeDetermination by content if local file, i.e. access the file,
0147      *                                   open and read part of it;
0148      *                                   by QMimeDatabase::MatchMode::MatchExtension if not local.
0149      *       SkipMimeTypeFromContent     always by QMimeDatabase::MatchMode::MatchExtension,
0150      *                                   i.e. won't access the file by stat() or opening it;
0151      *                                   only suitable for files, directories won't be recognized.
0152      * @since 5.57
0153      */
0154     KFileItem(const QUrl &url, KFileItem::MimeTypeDetermination mimeTypeDetermination);
0155 
0156     /**
0157      * Copy constructor
0158      */
0159     KFileItem(const KFileItem &);
0160 
0161     /**
0162      * Destructor
0163      */
0164     ~KFileItem();
0165 
0166     /**
0167      * Move constructor
0168      * @since 5.43
0169      */
0170     KFileItem(KFileItem &&);
0171 
0172     /**
0173      * Copy assignment
0174      */
0175     KFileItem &operator=(const KFileItem &);
0176 
0177     /**
0178      * Move assignment
0179      * @since 5.43
0180      */
0181     KFileItem &operator=(KFileItem &&);
0182 
0183     /**
0184      * Throw away and re-read (for local files) all information about the file.
0185      * This is called when the _file_ changes.
0186      */
0187     void refresh();
0188 
0189     /**
0190      * Re-reads MIME type information.
0191      * This is called when the MIME type database changes.
0192      */
0193     void refreshMimeType();
0194 
0195     /**
0196      * Sets MIME type determination to be immediate or on demand.
0197      * Call this after the constructor, and before using any MIME-type-related method.
0198      * @since 5.0
0199      */
0200     void setDelayedMimeTypes(bool b);
0201 
0202     /**
0203      * Returns the url of the file.
0204      * @return the url of the file
0205      */
0206     QUrl url() const;
0207 
0208     /**
0209      * Sets the item's URL. Do not call unless you know what you are doing!
0210      * (used for example when an item got renamed).
0211      * @param url the item's URL
0212      */
0213     void setUrl(const QUrl &url);
0214 
0215     /**
0216      * Sets the item's local path (UDS_LOCAL_PATH). Do not call unless you know what you are doing!
0217      * This won't change the item's name or URL.
0218      * (used for example when an item got renamed).
0219      * @param path the item's local path
0220      * @since 5.20
0221      */
0222     void setLocalPath(const QString &path);
0223 
0224     /**
0225      * Sets the item's name (i.e.\ the filename).
0226      * This is automatically done by setUrl, to set the name from the URL's fileName().
0227      * This method is provided for some special cases like relative paths as names (KFindPart)
0228      * @param name the item's name
0229      */
0230     void setName(const QString &name);
0231 
0232     /**
0233      * Returns the permissions of the file (stat.st_mode containing only permissions).
0234      * @return the permissions of the file
0235      */
0236     mode_t permissions() const;
0237 
0238     /**
0239      * Returns the access permissions for the file as a string.
0240      * @return the access permission as string
0241      */
0242     QString permissionsString() const;
0243 
0244     /**
0245      * Tells if the file has extended access level information ( Posix ACL )
0246      * @return true if the file has extend ACL information or false if it hasn't
0247      */
0248     bool hasExtendedACL() const;
0249 
0250     /**
0251      * Returns the access control list for the file.
0252      * @return the access control list as a KACL
0253      */
0254     KACL ACL() const;
0255 
0256     /**
0257      * Returns the default access control list for the directory.
0258      * @return the default access control list as a KACL
0259      */
0260     KACL defaultACL() const;
0261 
0262     /**
0263      * Returns the file type (stat.st_mode containing only S_IFDIR, S_IFLNK, ...).
0264      * @return the file type
0265      */
0266     mode_t mode() const;
0267 
0268     /**
0269      * Returns the owner of the file.
0270      * @return the file's owner
0271      */
0272     QString user() const;
0273 
0274     /**
0275      * Returns the group of the file.
0276      * @return the file's group
0277      */
0278     QString group() const;
0279 
0280     /**
0281      * Returns true if this item represents a link in the UNIX sense of
0282      * a link.
0283      * @return true if the file is a link
0284      */
0285     bool isLink() const;
0286 
0287     /**
0288      * Returns true if this item represents a directory.
0289      * @return true if the item is a directory
0290      */
0291     bool isDir() const;
0292 
0293     /**
0294      * Returns true if this item represents a file (and not a directory)
0295      * @return true if the item is a file
0296      */
0297     bool isFile() const;
0298 
0299     /**
0300      * Checks whether the file or directory is readable. In some cases
0301      * (remote files), we may return true even though it can't be read.
0302      * @return true if the file can be read - more precisely,
0303      *         false if we know for sure it can't
0304      */
0305     bool isReadable() const;
0306 
0307     /**
0308      * Checks whether the file or directory is writable. In some cases
0309      * (remote files), we may return true even though it can't be written to.
0310      * @return true if the file or directory can be written to - more precisely,
0311      *         false if we know for sure it can't
0312      */
0313     bool isWritable() const;
0314 
0315     /**
0316      * Checks whether the file is hidden.
0317      * @return true if the file is hidden.
0318      */
0319     bool isHidden() const;
0320 
0321     /**
0322      * @return true if the file is a remote URL, or a local file on a network mount.
0323      * It will return false only for really-local file systems.
0324      * @since 4.7.4
0325      */
0326     bool isSlow() const;
0327 
0328     /**
0329      * Checks whether the file is a readable local .desktop file,
0330      * i.e.\ a file whose path can be given to KDesktopFile
0331      * @return true if the file is a desktop file.
0332      * @since 4.1
0333      */
0334     bool isDesktopFile() const;
0335 
0336     /**
0337      * Returns the link destination if isLink() == true.
0338      * @return the link destination. QString() if the item is not a link
0339      */
0340     QString linkDest() const;
0341 
0342     /**
0343      * Returns the target url of the file, which is the same as url()
0344      * in cases where the worker doesn't specify UDS_TARGET_URL
0345      * @return the target url.
0346      * @since 4.1
0347      */
0348     QUrl targetUrl() const;
0349 
0350     /**
0351      * Returns the local path if isLocalFile() == true or the KIO item has
0352      * a UDS_LOCAL_PATH atom.
0353      * @return the item local path, or QString() if not known
0354      */
0355     QString localPath() const;
0356 
0357     /**
0358      * Returns the size of the file, if known.
0359      * @return the file size, or 0 if not known
0360      */
0361     KIO::filesize_t size() const;
0362 
0363     /**
0364      * @brief For folders, its recursive size:
0365      * the size of its files plus the recursiveSize of its folder
0366      *
0367      * Initially only implemented for trash:/
0368      *
0369      * @since 5.70
0370      * @return The recursive size
0371      */
0372     KIO::filesize_t recursiveSize() const;
0373 
0374     /**
0375      * Requests the modification, access or creation time, depending on @p which.
0376      * @param which the timestamp
0377      * @return the time asked for, QDateTime() if not available
0378      * @see timeString()
0379      */
0380     Q_INVOKABLE QDateTime time(FileTimes which) const;
0381 
0382     /**
0383      * Requests the modification, access or creation time as a string, depending
0384      * on @p which.
0385      * @param which the timestamp
0386      * @returns a formatted string of the requested time.
0387      * @see time
0388      */
0389     Q_INVOKABLE QString timeString(FileTimes which = ModificationTime) const;
0390 
0391 #if KIOCORE_ENABLE_DEPRECATED_SINCE(4, 0)
0392     KIOCORE_DEPRECATED_VERSION(4, 0, "Use KFileItem::timeString(FileTimes)")
0393     QString timeString(unsigned int which) const;
0394 #endif
0395 
0396     /**
0397      * Returns true if the file is a local file.
0398      * @return true if the file is local, false otherwise
0399      */
0400     bool isLocalFile() const;
0401 
0402     /**
0403      * Returns the text of the file item.
0404      * It's not exactly the filename since some decoding happens ('%2F'->'/').
0405      * @return the text of the file item
0406      */
0407     QString text() const;
0408 
0409     /**
0410      * Return the name of the file item (without a path).
0411      * Similar to text(), but unencoded, i.e. the original name.
0412      * @param lowerCase if true, the name will be returned in lower case,
0413      * which is useful to speed up sorting by name, case insensitively.
0414      * @return the file's name
0415      */
0416     QString name(bool lowerCase = false) const;
0417 
0418     /**
0419      * Returns the MIME type of the file item.
0420      * If @p delayedMimeTypes was used in the constructor, this will determine
0421      * the MIME type first. Equivalent to determineMimeType()->name()
0422      * @return the MIME type of the file
0423      */
0424     QString mimetype() const;
0425 
0426     /**
0427      * Returns the MIME type of the file item.
0428      * If delayedMimeTypes was used in the constructor, this will determine
0429      * the MIME type first.
0430      * @return the MIME type
0431      */
0432     QMimeType determineMimeType() const;
0433 
0434     /**
0435      * Returns the currently known MIME type of the file item.
0436      * This will not try to determine the MIME type if unknown.
0437      * @return the known MIME type
0438      */
0439     QMimeType currentMimeType() const;
0440 
0441     /**
0442      * @return true if we have determined the final icon of this file already.
0443      * @since 4.10.2
0444      */
0445     bool isFinalIconKnown() const;
0446 
0447     /**
0448      * @return true if we have determined the MIME type of this file already,
0449      * i.e. if determineMimeType() will be fast. Otherwise it will have to
0450      * find what the MIME type is, which is a possibly slow operation; usually
0451      * this is delayed until necessary.
0452      */
0453     bool isMimeTypeKnown() const;
0454 
0455     /**
0456      * Returns the user-readable string representing the type of this file,
0457      * like "OpenDocument Text File".
0458      * @return the type of this KFileItem
0459      */
0460     QString mimeComment() const;
0461 
0462     /**
0463      * Returns the full path name to the icon that represents
0464      * this MIME type.
0465      * @return iconName the name of the file's icon
0466      */
0467     QString iconName() const;
0468 
0469     /**
0470      * Returns the overlays (bitfield of KIconLoader::*Overlay flags) that are used
0471      * for this item's pixmap. Overlays are used to show for example, whether
0472      * a file can be modified.
0473      * @return the overlays of the pixmap
0474      */
0475     QStringList overlays() const;
0476 
0477     /**
0478      * A comment which can contain anything - even rich text. It will
0479      * simply be displayed to the user as is.
0480      *
0481      * @since 4.6
0482      */
0483     QString comment() const;
0484 
0485     /**
0486      * Returns the string to be displayed in the statusbar,
0487      * e.g.\ when the mouse is over this item.
0488      * @return the status bar information
0489      */
0490     QString getStatusBarInfo() const;
0491 
0492 #if KIOCORE_ENABLE_DEPRECATED_SINCE(4, 0)
0493     /**
0494      * Returns true if files can be dropped over this item.
0495      * Contrary to popular belief, not only dirs will return true :)
0496      * Executables, .desktop files, will do so as well.
0497      * @return true if you can drop files over the item
0498      *
0499      * @deprecated Since 4.0. This logic is application-dependent, the behavior described above
0500      * mostly makes sense for file managers only.
0501      * KDirModel has setDropsAllowed for similar (but configurable) logic.
0502      */
0503     KIOCORE_DEPRECATED_VERSION(4, 0, "See API docs")
0504     bool acceptsDrops() const;
0505 #endif
0506 
0507     /**
0508      * Returns the UDS entry. Used by the tree view to access all details
0509      * by position.
0510      * @return the UDS entry
0511      */
0512     KIO::UDSEntry entry() const;
0513 
0514     /**
0515      * Return true if this item is a regular file,
0516      * false otherwise (directory, link, character/block device, fifo, socket)
0517      * @since 4.3
0518      */
0519     bool isRegularFile() const;
0520 
0521     /**
0522      * Somewhat like a comparison operator, but more explicit,
0523      * and it can detect that two fileitems differ if any property of the file item
0524      * has changed (file size, modification date, etc.). Two items are equal if
0525      * all properties are equal. In contrast, operator== only compares URLs.
0526      * @param item the item to compare
0527      * @return true if all values are equal
0528      */
0529     bool cmp(const KFileItem &item) const;
0530 
0531     /**
0532      * Returns true if both items share the same URL.
0533      */
0534     bool operator==(const KFileItem &other) const;
0535 
0536     /**
0537      * Returns true if both items do not share the same URL.
0538      */
0539     bool operator!=(const KFileItem &other) const;
0540 
0541     /**
0542      * Returns true if this item's URL is lexically less than other's URL; otherwise returns false
0543      * @since 5.48
0544      */
0545     bool operator<(const KFileItem &other) const;
0546 
0547     /**
0548      * Returns true if this item's URL is lexically less than url other; otherwise returns false
0549      * @since 5.48
0550      */
0551     bool operator<(const QUrl &other) const;
0552 
0553     /**
0554      * Converts this KFileItem to a QVariant, this allows to use KFileItem
0555      * in QVariant() constructor
0556      */
0557     operator QVariant() const;
0558 
0559 #if KIOCORE_ENABLE_DEPRECATED_SINCE(4, 0)
0560     /**
0561      * @deprecated Since 4.0, simply use '='
0562      */
0563     KIOCORE_DEPRECATED_VERSION(4, 0, "Use KFileItem::operator=(const KFileItem&)")
0564     void assign(const KFileItem &item);
0565 #endif
0566 
0567     /**
0568      * Tries to return a local URL for this file item if possible.
0569      * If @p local is not null, it will be set to @c true if the returned url is local,
0570      * @c false otherwise.
0571      *
0572      * Example:
0573      * @code
0574      * bool isLocal = false;
0575      * KFileItem item;
0576      * const QUrl url = item.mostLocalUrl(&isLocal);
0577      * if (isLocal) {
0578      *    // Use url
0579      * }
0580      * @endcode
0581      *
0582      * @since 4.6
0583      */
0584     QUrl mostLocalUrl(bool *local = nullptr) const;
0585 
0586     struct MostLocalUrlResult {
0587         QUrl url;
0588         bool local;
0589     };
0590 
0591     /**
0592      * Returns a MostLocalUrlResult, with the local Url for this item if possible
0593      * (otherwise an empty Url), and a bool that is set to @c true if this Url
0594      * does represent a local file otherwise @c false.
0595      *
0596      * Basically this is an alternative to mostLocalUrl(bool*), that does not use an
0597      * output parameter.
0598      *
0599      * Example:
0600      * @code
0601      * KFileItem item;
0602      * const MostLocalUrlResult result = item.isMostLocalUrl();
0603      * if (result.local) { // A local file
0604      *    // Use result.url
0605      * }
0606      * @endcode
0607      * @since 5.84
0608      */
0609     MostLocalUrlResult isMostLocalUrl() const;
0610 
0611 #if KIOCORE_ENABLE_DEPRECATED_SINCE(5, 0)
0612     /**
0613      * @deprecated since 5.0 add '&' in front of your boolean argument
0614      */
0615     KIOCORE_DEPRECATED_VERSION(5, 0, "Use KFileItem::mostLocalUrl(bool *)")
0616     QUrl mostLocalUrl(bool &local) const
0617     {
0618         return mostLocalUrl(&local);
0619     }
0620 #endif
0621 
0622     /**
0623      * Return true if default-constructed
0624      */
0625     bool isNull() const;
0626 
0627 private:
0628     QSharedDataPointer<KFileItemPrivate> d;
0629 
0630     /**
0631      * Hides the file.
0632      */
0633     KIOCORE_NO_EXPORT void setHidden();
0634 
0635 private:
0636     KIOCORE_EXPORT friend QDataStream &operator<<(QDataStream &s, const KFileItem &a);
0637     KIOCORE_EXPORT friend QDataStream &operator>>(QDataStream &s, KFileItem &a);
0638 
0639     friend class KFileItemTest;
0640     friend class KCoreDirListerCache;
0641 };
0642 
0643 Q_DECLARE_METATYPE(KFileItem)
0644 Q_DECLARE_TYPEINFO(KFileItem, Q_MOVABLE_TYPE);
0645 
0646 inline uint qHash(const KFileItem &item)
0647 {
0648     return qHash(item.url());
0649 }
0650 
0651 /**
0652  * @class KFileItemList kfileitem.h <KFileItem>
0653  *
0654  * List of KFileItems, which adds a few helper
0655  * methods to QList<KFileItem>.
0656  */
0657 class KIOCORE_EXPORT KFileItemList : public QList<KFileItem>
0658 {
0659 public:
0660     /// Creates an empty list of file items.
0661     KFileItemList();
0662 
0663     /// Creates a new KFileItemList from a QList of file @p items.
0664     KFileItemList(const QList<KFileItem> &items);
0665 
0666     /// Creates a new KFileItemList from an initializer_list of file @p items.
0667     /// @since 5.76
0668     KFileItemList(std::initializer_list<KFileItem> items);
0669 
0670     /**
0671      * Find a KFileItem by name and return it.
0672      * @return the item with the given name, or a null-item if none was found
0673      *         (see KFileItem::isNull())
0674      */
0675     KFileItem findByName(const QString &fileName) const;
0676 
0677     /**
0678      * Find a KFileItem by URL and return it.
0679      * @return the item with the given URL, or a null-item if none was found
0680      *         (see KFileItem::isNull())
0681      */
0682     KFileItem findByUrl(const QUrl &url) const;
0683 
0684     /// @return the list of URLs that those items represent
0685     QList<QUrl> urlList() const;
0686 
0687     /// @return the list of target URLs that those items represent
0688     /// @since 4.2
0689     QList<QUrl> targetUrlList() const;
0690 
0691     // TODO KDE-5 add d pointer here so that we can merge KFileItemListProperties into KFileItemList
0692 };
0693 
0694 KIOCORE_EXPORT QDataStream &operator<<(QDataStream &s, const KFileItem &a);
0695 KIOCORE_EXPORT QDataStream &operator>>(QDataStream &s, KFileItem &a);
0696 
0697 /**
0698  * Support for qDebug() << aFileItem
0699  * \since 4.4
0700  */
0701 KIOCORE_EXPORT QDebug operator<<(QDebug stream, const KFileItem &item);
0702 
0703 #endif