Re: semantics of gnome_vfs_get_file_info_from_handle



On Mon, 2003-02-03 at 10:03, Alexander Larsson wrote:

> I dunno. This is basically a uri based stat and fstat. fstat still does 
> the same i/o that stat does. Only it doesn't have to do the pathname 
> lookup.
> 
> Do you want it to keep reporting the same size as on open always too?

Actually I take my previous proposal back.  I think it would be better
for applications to be able to just get what information the handle
currently knows.  So the API would look like:

GnomeVFSResult	 gnome_vfs_get_known_file_info_from_handle
						(GnomeVFSHandle *handle,
						 GnomeVFSFileInfo *info);

This call would *never* do any calls to the OS or whatever; it would
return whatever information is currently known.  Now again we can make a
"dummy" implementation which would just return nothing, so modules which
don't support this optimization don't have to change.  

Actually, we could implement my previous proposal on entirely top of
this method, by getting the known fields from the handle, comparing them
to the user's requested fields, and if the user wants something not in
the known fields, then we fall back to the full
gnome_vfs_get_file_info_from_handle.




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