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)
70 Unknown =
static_cast<mode_t
>(-1)
88 enum MimeTypeDetermination {
89 NormalMimeTypeDetermination = 0,
90 SkipMimeTypeFromContent,
92 Q_ENUM(MimeTypeDetermination)
136 KFileItem(
const QUrl &url, KFileItem::MimeTypeDetermination mimeTypeDetermination);
175 void refreshMimeType();
182 void setDelayedMimeTypes(
bool b);
195 void setUrl(
const QUrl &url);
204 void setLocalPath(
const QString &path);
212 void setName(
const QString &name);
218 mode_t permissions()
const;
224 QString permissionsString()
const;
230 bool hasExtendedACL()
const;
242 KACL defaultACL()
const;
300 bool isReadable()
const;
308 bool isWritable()
const;
314 bool isHidden()
const;
328 bool isDesktopFile()
const;
341 QUrl targetUrl()
const;
391 bool isLocalFile()
const;
407 QString name(
bool lowerCase =
false)
const;
436 bool isFinalIconKnown()
const;
444 bool isMimeTypeKnown()
const;
480 QString getStatusBarInfo()
const;
493 bool isRegularFile()
const;
515 bool operator==(
const KFileItem &other)
const;
520 bool operator!=(
const KFileItem &other)
const;
526 bool operator<(
const KFileItem &other)
const;
532 bool operator<(
const QUrl &other)
const;
556 QUrl mostLocalUrl(
bool *local =
nullptr)
const;
558 struct MostLocalUrlResult {
581 MostLocalUrlResult isMostLocalUrl()
const;
599 bool isExecutable()
const;
607 KIOCORE_NO_EXPORT
void setHidden();
613 friend class KFileItemTest;
614 friend class KCoreDirListerCache;
618Q_DECLARE_TYPEINFO(
KFileItem, Q_RELOCATABLE_TYPE);
622 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 Sat Dec 21 2024 16:58:45 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.