Re: semantics of gnome_vfs_get_file_info_from_handle
- From: Colin Walters <walters debian org>
- To: gnome-vfs-list gnome org
- Subject: Re: semantics of gnome_vfs_get_file_info_from_handle
- Date: 03 Feb 2003 12:22:21 -0500
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.
I see the analogy.
> Do you want it to keep reporting the same size as on open always too?
Probably not. I think now that we should create a new operation like
gnome_vfs_request_file_info_from_handle(GnomeVFSHandle *handle,
GnomeVFSFileInfoFields fields,
GnomeVFSFileInfoOptions options,
GnomeVFSFileInfo *ret);
This operation would allow the user to request specific fields. For the
GStreamer gnomevfssrc, all I want to get is the mime type. So I would
just pass that field in "fields", and gnome-vfs would see that it was
stored in the handle, and just return it right away.
If the user requested fields that weren't already known cached in the
handle, the module would make a full new request.
What do you think? This shouldn't be too hard to implement. We can
just have a 'dummy' implementation which falls back to the full
get_file_info_from_handle implementation, so modules which don't gather
any information during handle creation don't have to change.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]