Re: Plans for gnome-vfs replacement

On Wed, 2006-09-20 at 15:32 +0200, Paolo Maggi wrote:
> Hi,
> > Now, these are not quite posix operation, but they are not totally
> > unlike it either. I'm not sure how this could be harder to map to ftp or
> > http than posix? 
> It will not be harder, but we will probably have the same problems we
> had with the old gnome-vfs modules to implement the "backends" for HTTP
> and FTP. I mean you cannot partially read a file or partially write it
> using HTTP (see the "close" problem with HTTP module you described in
> your mail).

I'm not sure what you mean by "partially write" of a file. Say you call
the create() method, then you write to the stream, and then you close
it. How could this be partial? The close marks the end of the file data.

As to partial reads. The only way to get that with the api I proposed
would be to close the input stream before you get to EOF. This isn't all
that hard to handle for http, just drop the connection.

> So, the question is: do we really need a low-level API to read/write
> files? Do you see real use cases where applications using VFS want to
> partially read/write files (also considering that the real behavior will
> be dependent on the backend implementation)?

Partial reads will be needed for mime sniffing, other partial ops are
not possible.

Maybe you could explain what sort of API you would think not to be
"low-level". I don't think i really get it.

> I like the Havoc's idea about a using DAV as a model for a VFS API.

My proposal is very similar to DAV. DAV certainly is a streaming model
(although over a tcp stream, not an abstract stream) with separate put
and get methods like in my proposal, and the PROPFIND model havoc talked
about is exactly like the proposed readdir replacement.

 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a lounge-singing overambitious paranormal investigator with a robot buddy 
named Sparky. She's a sharp-shooting red-headed politician with someone else's 
memories. They fight crime! 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]