## Advanced File Operations Advanced File Operations — |

## Synopsis

    GnomeVFSResult gnome_vfs_file_control       (GnomeVFSHandle *handle,
                                                 const char *operation,
                                                 gpointer operation_data);
    GnomeVFSResult gnome_vfs_forget_cache       (GnomeVFSHandle *handle,
                                                 GnomeVFSFileOffset offset,
                                                 GnomeVFSFileSize size);

## Description

## Details

### gnome_vfs_file_control ()

    GnomeVFSResult gnome_vfs_file_control       (GnomeVFSHandle *handle,
                                                 const char *operation,
                                                 gpointer operation_data);

Execute a backend dependent operation specified by the string `operation`. This is typically used for specialized vfs backends that need additional operations that gnome-vfs doesn't have. Compare it to the unix call `ioctl()`. The format of `operation_data` depends on the operation. Operation that are backend specific are normally namespaced by their module name.

`handle` : | handle of the file to affect.
`operation` : | operation to execute.
`operation_data` : | data needed to execute the operation.
Returns : | an integer representing the success of the operation.

### gnome_vfs_forget_cache ()

    GnomeVFSResult gnome_vfs_forget_cache       (GnomeVFSHandle *handle,
                                                 GnomeVFSFileOffset offset,
                                                 GnomeVFSFileSize size);

With this call you can announce to gnome-vfs that you will no longer use the region of data starting at `offset` with the size of `size`. Any cached data for this region might then be freed.

This might be useful if you stream large files, for example.

`handle` : | handle of the file to affect.
`offset` : | start point of the region to be freed.
`size` : | length of the region to be freed (or until the end of the file if 0 is specified).
Returns : | an integer representing the result of the operation.

Since 2.12