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

List:       kde-core-devel
Subject:    Re: KIO::SlaveBase::{stat,listDir}, I need full URL
From:       David Faure <david () mandrakesoft ! com>
Date:       2000-04-12 8:11:42
[Download RAW message or body]

On Wed, Apr 12, 2000 at 04:38:14AM +0200, Michael Matz wrote:
> Hi,
> 
> in the get() method of kioslaves I can reconstruct the whole URL by
> concatenating the path and the query. But in my case I also need the query
> string in stat() and listDir() as it makes semantically a difference,
> depending on some attributes, if the entry is a "dir" or a "file".

Indeed. Since they are in get(), I guess we should add them there too,
in fact in any method that passes a path.

> Better yet, if KIO would not hack the URL itself apart, at least not with
> protocols it doesn't understand.

KIO deals with all URLs the same way.
It hacks it apart because I think it makes sense. Passing the full URL
has a huge semantics problem: what would a FTP slave do with a HTTP URL ?
Of course, you'll say this is never going to happen, but more generally,
it is a lot simpler if the protocol+host+port+user+pass are set using
the proper method (openConnection IIRC), instead of passed into the URL.
By _not_ passing the full URL, we are sure that changes in protocol/
host/port/user/pass are handled the correct way, and when one calls
listdir(path), the slave knows all the rest it knows is still valid.
If it received a full URL in listDir, it would have to check that the
host/etc. are still valid, which is a waste.

But yes, you are right, the query is missing from most calls.
Do you want to add it, or should I do it ?

-- 
David FAURE
david@mandrakesoft.com, faure@kde.org
http://home.clara.net/faure/
KDE, Making The Future of Computing Available Today

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

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