[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: LIB_KFM
From: Sven Radej <sven () lisa ! exp ! univie ! ac ! at>
Date: 1999-06-03 13:07:05
[Download RAW message or body]
On Thu, 03 Jun 1999, David Faure wrote:
(...)
>[I still didn't understand how it works, to detect
>that something has changed in a dir. Does it poll the dir ?]
Torben said that he changed 70% of code in KRegistry and KDirWatch, so I'm not
sure if this info still stands.
KDirWatch checks for ctime of given directories every n seconds and if something
is changed in directory, recurses into it and checks which file/subdir has
changed (by comparing ctime of each file to stored last ctime). It can also
detect if some file/subdir was deleted from directory.
This makes KDirWatch very fast and has low overhead. (less than 1% cpu time on
486/80 for average applnks and mimetype database).
But, I ovrlooked something: ctime of directory is changed only if a file
was added or deleted from directory; I used to check it by modifying files with
editor, but editor makes a backup file (file~) and this changes directory's
ctime.
I am afraid that changing a file won't change it's directory's ctime. However
if user changes .desktop file with konquerror, konquerror knows that something
is changed and can reload that .desktop file.
Copying/moving/deleting a .desktop from terminal or changing it with editor
will trigger KDirWatch, so I think it is enough.
--
Sven Radej radej@kde.org
KDE developer Visit http://www.kde.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic