[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: KDirLister keeps mounted devices in use
From:       Waldo Bastian <bastian () kde ! org>
Date:       2003-01-07 23:17:08
[Download RAW message or body]

On Tuesday 07 January 2003 23:22, Michael Brade wrote:
> Well ok, seriously. I could make KDirLister not put things like floppy and
> cdrom (wich is flawed anyways, who wants to watch a cdrom? :) in KDirWatch
> once that dir is in itemsCached. I think it's worth the speed we loose,
> right? ;) But, how to detect if an url is a floppy, cdrom, Zip or not? And
> furthermore, I occasionally mount harddisks temporarily. I can't think of a
> solution here... besides removing the "speedy caching" feature altogether
> :/

Instead of relying on KDirWatch, can't you somehow check whether the cache is 
still valid before you reuse it? Maybe something like:

check mtime/ctime of dir
if modified
  throw away cache
else
  show cache
  validate (and update) cached items 

Checking the mtime/ctime should detect new/deleted files I think, so you only 
need to validate to update any file attributes (time/size)

You could also check with KIO::probably_slow_mounted and keep using KDirWatch 
when it isn't slow.

Cheers,
Waldo
-- 
bastian@kde.org -=|[ SuSE, The Linux Desktop Experts ]|=- bastian@suse.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic