|
sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName); int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt); int sqlite3_vfs_unregister(sqlite3_vfs*);
A virtual filesystem (VFS) is an sqlite3_vfs object that SQLite uses to interact with the underlying operating system. Most SQLite builds come with a single default VFS that is appropriate for the host computer. New VFSes can be registered and existing VFSes can be unregistered. The following interfaces are provided.
The sqlite3_vfs_find() interface returns a pointer to a VFS given its name. Names are case sensitive. Names are zero-terminated UTF-8 strings. If there is no match, a NULL pointer is returned. If zVfsName is NULL then the default VFS is returned.
New VFSes are registered with sqlite3_vfs_register(). Each new VFS becomes the default VFS if the makeDflt flag is set. The same VFS can be registered multiple times without injury. To make an existing VFS into the default VFS, register it again with the makeDflt flag set. If two different VFSes with the same name are registered, the behavior is undefined. If a VFS is registered with a name that is NULL or an empty string, then the behavior is undefined.
Unregister a VFS with the sqlite3_vfs_unregister() interface. If the default VFS is unregistered, another VFS is chosen as the default. The choice for the new VFS is arbitrary.
H11203 | The sqlite3_vfs_find(N) interface returns a pointer to the registered sqlite3_vfs object whose name exactly matches the zero-terminated UTF-8 string N, or it returns NULL if there is no match. |
H11206 | If the N parameter to sqlite3_vfs_find(N) is NULL then the function returns a pointer to the default sqlite3_vfs object if there is one, or NULL if there is no default sqlite3_vfs object. |
H11209 | The sqlite3_vfs_register(P,F) interface registers the well-formed sqlite3_vfs object P using the name given by the zName field of the object. |
H11212 | Using the sqlite3_vfs_register(P,F) interface to register the same sqlite3_vfs object multiple times is a harmless no-op. |
H11215 | The sqlite3_vfs_register(P,F) interface makes the sqlite3_vfs object P the default sqlite3_vfs object if F is non-zero. |
H11218 | The sqlite3_vfs_unregister(P) interface unregisters the sqlite3_vfs object P so that it is no longer returned by subsequent calls to sqlite3_vfs_find(). |
See also lists of Objects, Constants, and Functions.