11#include "kiocore_export.h"
16#include <kio/global.h>
17#include <kio/udsentry.h>
21#include <qplatformdefs.h>
23class KFileItemPrivate;
39 Q_PROPERTY(
QUrl url READ url WRITE setUrl)
40 Q_PROPERTY(
QString user READ user)
41 Q_PROPERTY(
QString group READ group)
42 Q_PROPERTY(
bool isLink READ isLink)
43 Q_PROPERTY(
bool isDir READ isDir)
44 Q_PROPERTY(
bool isFile READ isFile)
45 Q_PROPERTY(
bool isReadable READ isReadable)
46 Q_PROPERTY(
bool isWritable READ isWritable)
47 Q_PROPERTY(
bool isHidden READ isHidden)
48 Q_PROPERTY(
bool isSlow READ isSlow)
49 Q_PROPERTY(
bool isDesktopFile READ isDesktopFile)
50 Q_PROPERTY(
QString linkDest READ linkDest)
51 Q_PROPERTY(
QUrl targetUrl READ targetUrl)
52 Q_PROPERTY(
QString localPath READ localPath WRITE setLocalPath)
53 Q_PROPERTY(
bool isLocalFile READ isLocalFile)
54 Q_PROPERTY(
QString text READ text)
55 Q_PROPERTY(
QString name READ name WRITE setName)
56 Q_PROPERTY(
QString mimetype READ mimetype)
57 Q_PROPERTY(
QMimeType determineMimeType READ determineMimeType)
58 Q_PROPERTY(
QMimeType currentMimeType READ currentMimeType)
59 Q_PROPERTY(
bool isFinalIconKnown READ isFinalIconKnown)
60 Q_PROPERTY(
bool isMimeTypeKnown READ isMimeTypeKnown)
61 Q_PROPERTY(
QString mimeComment READ mimeComment)
62 Q_PROPERTY(
QString iconName READ iconName)
64 Q_PROPERTY(
QString comment READ comment)
65 Q_PROPERTY(
QString getStatusBarInfo READ getStatusBarInfo)
66 Q_PROPERTY(
bool isRegularFile READ isRegularFile)
69 enum { Unknown =
static_cast<mode_t
>(-1) };
86 enum MimeTypeDetermination {
87 NormalMimeTypeDetermination = 0,
88 SkipMimeTypeFromContent,
90 Q_ENUM(MimeTypeDetermination)
134 KFileItem(
const QUrl &url, KFileItem::MimeTypeDetermination mimeTypeDetermination);
173 void refreshMimeType();
180 void setDelayedMimeTypes(
bool b);
193 void setUrl(
const QUrl &url);
202 void setLocalPath(
const QString &path);
210 void setName(
const QString &name);
216 mode_t permissions()
const;
222 QString permissionsString()
const;
228 bool hasExtendedACL()
const;
240 KACL defaultACL()
const;
298 bool isReadable()
const;
306 bool isWritable()
const;
312 bool isHidden()
const;
326 bool isDesktopFile()
const;
339 QUrl targetUrl()
const;
389 bool isLocalFile()
const;
405 QString name(
bool lowerCase =
false)
const;
434 bool isFinalIconKnown()
const;
442 bool isMimeTypeKnown()
const;
478 QString getStatusBarInfo()
const;
491 bool isRegularFile()
const;
513 bool operator==(
const KFileItem &other)
const;
518 bool operator!=(
const KFileItem &other)
const;
524 bool operator<(
const KFileItem &other)
const;
530 bool operator<(
const QUrl &other)
const;
554 QUrl mostLocalUrl(
bool *local =
nullptr)
const;
556 struct MostLocalUrlResult {
579 MostLocalUrlResult isMostLocalUrl()
const;
597 bool isExecutable()
const;
605 KIOCORE_NO_EXPORT
void setHidden();
611 friend class KFileItemTest;
612 friend class KCoreDirListerCache;
616Q_DECLARE_TYPEINFO(
KFileItem, Q_RELOCATABLE_TYPE);
620 return qHash(item.url(), seed);
The KACL class encapsulates a POSIX Access Control List.
List of KFileItems, which adds a few helper methods to QList<KFileItem>.
A KFileItem is a generic class to handle a file, local or remote.
KFileItem & operator=(const KFileItem &)
Copy assignment.
KFileItem(KFileItem &&)
Move constructor.
FileTimes
The timestamps associated with a file.
KFileItem & operator=(KFileItem &&)
Move assignment.
KFileItem(const KFileItem &)
Copy constructor.
Universal Directory Service.
qulonglong filesize_t
64-bit file size
KTEXTEDITOR_EXPORT size_t qHash(KTextEditor::Cursor cursor, size_t seed=0) noexcept
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 18 2024 11:55:59 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.