A way to override requested filename



This probably sounds very strange. But I would find it useful if a VFS module could override the filename requested with gnome_vfs_create(). The reason for this is that I'm writing a module for accessing SQL databases with gnome-VFS and SQL has a feature to assign a unique number to a field, thus generating a unique "filename" if you want to. But the same feature could have other uses as well. Perhaps tempfs-module which can guarantee that the requested filename is and remains unique by appending some characters to it. Or a module for a filesystem, which has extensive restrictions on the filenames, could modify the requested filename into a valid one.

My idea of extending the API to support this is to add a flag to gnome_vfs_create() which indicates that the application accepts the filename to be overridden. And the new filename could be queried with gnome_vfs_get_file_info_from_handle() I guess.

Maybe this is already possible, just me not getting it?



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