A KDE-way to know if a file is sequential/non-random

Darío Andrés andresbajotierra at gmail.com
Mon May 25 23:50:11 BST 2009


Hi everyone.

I was developing some fixes for hangs that occur when some
applications try to access special files like pipes, or char/block
devices.
http://reviewboard.kde.org/r/723/
The patch in that review proposal will fix the hang locally (on
KPropertiesDialog) (btw: Dolphin tooltips also suffer this issue)

kdepepo and I were thinking about doing this globally on KFileItem /
KFileMetaInfo so every app accessing the metainfo of a file will not
block the whole application.

I was wondering what is the best way / methods to check that..
Currently my patch is using "S_ISFIFO"/CHR/BLK but we were wondering
if a KDE function like "isRegularFile" exists (or it should be
created). I tested with the Qt function "QFile::isSequential" but it
didn't worked properly.
(Also, this new function should work on all the supported platforms/systems )

I guess some other application will also benefit from this new
function (KFind as an example)

Regards
Dario Andres
BugSquad Team, DrKonqi2 Developer




More information about the kde-core-devel mailing list