GNOME Bugzilla – Bug 302202
[Patch] RFE: module support in gnome_vfs_get_volume_free_space
Last modified: 2005-05-02 13:45:31 UTC
gnome_vfs_get_volume_free_space should provide module support. There should be a new method func GnomeVFSMethodGetVolumeFreeSpaceFunc which handles this.
Created attachment 45766 [details] [review] Proposed patch
I wonder if maybe this should just be added to the vfs file information structure and fetched via the current vfs stat call? In any case, if this gets merged, please make a comment about it in bug #148297 since your patch will invalidate the patch there.
Having it implemented by adding a new MethodFunc has the advantage that it doesn't break the GNOME-VFS API.
If it's added as a new field to the structure that nobody knows about then you're keeping API compatibility just as much as adding a new function call. also: The GnomeVFSFileInfo structure contains extra space at the end (void *reserved1-*reserved5) so that the field can be added without breaking ABI compatibility. I'm not sure that I actually like my idea -- I'm just presenting it as an alternative.
Hmm.. One thing is that the free volume space isn't really file info but more volume info so it would probably be good to seperate it. However, gnome_vfs_get_volume_free_space already takes a file URL to make out the volume. If we add it as a field to GnomeVFSFileInfo and deprecate gnome_vfs_get_volume_free_space but don't remove it for now but use it as a wrapper for get_file_info, it would not break API nor ABI. Probably good.
I prefer it as a separate call. GnomeVFSFileInfo is really information about the file, and volume info is not, even if it takes a uri argument.