KDECore
kdirwatch.cpp
Go to the documentation of this file.
245 kDebug(7001) << "Available methods: " << availableMethods << "preferred=" << methodToString(m_preferredMethod);
312 // Is set to true if the new event is a directory, false otherwise. This prevents a stat call in clientsForFileOrDir
525 QList<KDirWatchPrivate::Client *> KDirWatchPrivate::Entry::clientsForFileOrDir(const QString& tpath, bool* isDir) const
547 // inotify specific function that doesn't call KDE::stat to figure out if we have a file or folder.
548 // isDir is determined through inotify's "IN_ISDIR" flag in KDirWatchPrivate::inotifyEventReceived
549 QList<KDirWatchPrivate::Client *> KDirWatchPrivate::Entry::inotifyClientsForFileOrDir(bool isDir) const
697 int mask = IN_DELETE|IN_DELETE_SELF|IN_CREATE|IN_MOVE|IN_MOVE_SELF|IN_DONT_FOLLOW|IN_MOVED_FROM|IN_MODIFY|IN_ATTRIB;
893 if (e->m_mode == INotifyMode || (e->m_mode == UnknownMode && m_preferredMethod == KDirWatch::INotify) )
1254 // We need to make sure the entry isn't listed in its parent's subentries... (#222974, testMoveTo)
1356 QMetaObject::invokeMethod(c->instance, "setDeleted", Qt::QueuedConnection, Q_ARG(QString, path));
1362 QMetaObject::invokeMethod(c->instance, "setCreated", Qt::QueuedConnection, Q_ARG(QString, path));
1367 QMetaObject::invokeMethod(c->instance, "setDirty", Qt::QueuedConnection, Q_ARG(QString, path));
1622 //kDebug(7001) << "Got FAMDeleted for" << QFile::decodeName(fe->filename) << "in" << e->path << ". Absolute path -> NOOP!";
1695 kDebug(7001) << " " << d << d->path << (d->m_status == NonExistent ? "NonExistent" : "EXISTS!!! ERROR!");
1740 kWarning (7001) << "QFileSystemWatcher event received but QFileSystemWatcher is not supported";
QString parentDirectory() const
Definition: kdirwatch.cpp:520
static const char * methodToString(KDirWatch::Method method)
Definition: kdirwatch.cpp:106
QList< Client * > inotifyClientsForFileOrDir(bool isDir) const
Definition: kdirwatch.cpp:549
QList< Client * > clientsForFileOrDir(const QString &tpath, bool *isDir) const
Definition: kdirwatch.cpp:525
void truncate(int position)
Definition: kdirwatch_p.h:136
bool removeEntry(KDirWatch *, const QString &, Entry *sub_entry)
Definition: kdirwatch.cpp:995
static bool isNoisyFile(const char *filename)
Definition: kdirwatch.cpp:1502
bool stopEntryScan(KDirWatch *, Entry *)
Definition: kdirwatch.cpp:1096
Definition: kdirwatch_p.h:122
#define mask
int removeDuplicates()
Definition: kdirwatch.h:223
#define K_GLOBAL_STATIC(TYPE, NAME)
This macro makes it easy to use non-POD types as global statics.
Definition: kglobal.h:221
Definition: kdirwatch_p.h:122
void startScan(bool notify=false, bool skippedToo=false)
Starts scanning of all dirs in list.
Definition: kdirwatch.cpp:1870
Definition: kdirwatch_p.h:126
bool isSymLink() const
bool isEmpty() const
Method internalMethod()
Returns the preferred internal method to watch for changes.
Definition: kdirwatch.cpp:1927
QDebug & nospace()
Definition: kdirwatch_p.h:123
bool restartEntryScan(KDirWatch *, Entry *, bool)
Definition: kdirwatch.cpp:1122
QString currentPath()
Definition: kdirwatch_p.h:123
Definition: kdirwatch_p.h:121
Definition: kdirwatch_p.h:122
KDirWatch::WatchModes m_watchModes
Definition: kdirwatch_p.h:133
Type fileSystemType(const QString &path)
bool stopDirScan(const QString &path)
Stops scanning the specified path.
Definition: kdirwatch.cpp:1837
virtual bool event(QEvent *e)
Definition: kdirwatch_p.h:122
Definition: kdirwatch_p.h:122
QDateTime fromTime_t(uint seconds)
int count(const T &value) const
void append(const T &value)
void emitEvent(const Entry *e, int event, const QString &fileName=QString())
Definition: kdirwatch.cpp:1315
KDirWatch::Method m_nfsPreferredMethod
Definition: kdirwatch_p.h:233
static void statistics()
Dump statistic information about the KDirWatch::self() instance.
Definition: kdirwatch.cpp:1899
bool isDir() const
Definition: kdirwatch.h:223
bool isEmpty() const
QFileInfoList entryInfoList(QFlags< QDir::Filter > filters, QFlags< QDir::SortFlag > sort) const
void fswEventReceived(const QString &path)
Definition: kdirwatch.cpp:1707
void setObjectName(const QString &name)
QString absoluteFilePath() const
bool isEmpty() const
Definition: kdirwatch.h:223
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
Definition: kdirwatch_p.h:122
iterator end()
Definition: kdirwatch_p.h:121
QDateTime ctime(const QString &path) const
Returns the time the directory/file was last changed.
Definition: kdirwatch.cpp:1809
iterator begin()
QDebug & space()
bool isRelativePath(const QString &path)
void stop()
bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType type, QGenericReturnArgument ret, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8, QGenericArgument val9)
bool contains(const QString &path) const
Check if a directory is being watched by this KDirWatch instance.
Definition: kdirwatch.cpp:1879
QString cleanPath(const QString &path)
Definition: kdirwatch_p.h:88
Definition: kfilesystemtype_p.h:30
QDebug operator<<(QDebug debug, const KDirWatchPrivate::Entry &entry)
Definition: kdirwatch.cpp:561
Definition: kdirwatch_p.h:116
int length() const
QString left(int n) const
void removeDir(const QString &path)
Removes a directory from the list of scanned directories.
Definition: kdirwatch.cpp:1819
QString fromLatin1(const char *str, int size)
void addDir(const QString &path, WatchModes watchModes=WatchDirOnly)
Adds a directory to be watched.
Definition: kdirwatch.cpp:1796
void start(int msec)
Definition: kdirwatch.h:223
iterator insert(const Key &key, const T &value)
Definition: kdirwatch.h:223
static bool exists()
Returns true if there is an instance of KDirWatch.
Definition: kdirwatch.cpp:1755
typedef Iterator
Watch also all the subdirs contained by the directory.
Definition: kdirwatch.h:76
QString absolutePath() const
bool isStopped()
Is scanning stopped? After creation of a KDirWatch instance, this is false.
Definition: kdirwatch.cpp:1865
bool isActive() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void removeFile(const QString &file)
Removes a file from the list of watched files.
Definition: kdirwatch.cpp:1828
QObject * parent() const
Definition: kdirwatch_p.h:123
Entry * findSubEntry(const QString &path) const
Definition: kdirwatch_p.h:162
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
static KDirWatch::Method methodFromString(const QString &method)
Definition: kdirwatch.cpp:88
T readEntry(const QString &key, const T &aDefault) const
Reads the value of an entry specified by pKey in the current group.
Definition: kconfiggroup.h:248
void addClient(KDirWatch *, KDirWatch::WatchModes)
Definition: kdirwatch.cpp:469
void addEntry(KDirWatch *instance, const QString &_path, Entry *sub_entry, bool isDir, KDirWatch::WatchModes watchModes=KDirWatch::WatchDirOnly)
Definition: kdirwatch.cpp:763
bool restartDirScan(const QString &path)
Restarts scanning for specified path.
Definition: kdirwatch.cpp:1846
int count(const Key &key) const
iterator find(const Key &key)
QByteArray encodeName(const QString &fileName)
QString decodeName(const QByteArray &localFileName)
Definition: kdirwatch_p.h:123
int remove(const Key &key)
void setSingleShot(bool singleShot)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.