xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3_vfs_find.3 (revision d909946ca08dceb44d7d0f22ec9488679695d976)
1.Dd $Mdocdate$
2.Dt SQLITE3_VFS_FIND 3
3.Os
4.Sh NAME
5.Nm sqlite3_vfs_find ,
6.Nm sqlite3_vfs_register ,
7.Nm sqlite3_vfs_unregister
8.Nd Virtual File System Objects
9.Sh SYNOPSIS
10.Ft sqlite3_vfs *SQLITE_STDCALL
11.Fo sqlite3_vfs_find
12.Fa "const char *zVfsName"
13.Fc
14.Ft int SQLITE_STDCALL
15.Fo sqlite3_vfs_register
16.Fa "sqlite3_vfs*"
17.Fa "int makeDflt"
18.Fc
19.Ft int SQLITE_STDCALL
20.Fo sqlite3_vfs_unregister
21.Fa "sqlite3_vfs*"
22.Fc
23.Sh DESCRIPTION
24A virtual filesystem (VFS) is an sqlite3_vfs object that
25SQLite uses to interact with the underlying operating system.
26Most SQLite builds come with a single default VFS that is appropriate
27for the host computer.
28New VFSes can be registered and existing VFSes can be unregistered.
29The following interfaces are provided.
30.Pp
31The sqlite3_vfs_find() interface returns a pointer to a VFS given its
32name.
33Names are case sensitive.
34Names are zero-terminated UTF-8 strings.
35If there is no match, a NULL pointer is returned.
36If zVfsName is NULL then the default VFS is returned.
37.Pp
38New VFSes are registered with sqlite3_vfs_register().
39Each new VFS becomes the default VFS if the makeDflt flag is set.
40The same VFS can be registered multiple times without injury.
41To make an existing VFS into the default VFS, register it again with
42the makeDflt flag set.
43If two different VFSes with the same name are registered, the behavior
44is undefined.
45If a VFS is registered with a name that is NULL or an empty string,
46then the behavior is undefined.
47.Pp
48Unregister a VFS with the sqlite3_vfs_unregister() interface.
49If the default VFS is unregistered, another VFS is chosen as the default.
50The choice for the new VFS is arbitrary.
51.Sh SEE ALSO
52.Xr sqlite3_vfs 3
53