xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3_vfs_find.3 (revision b9988867a8ad969c45a52aa7628bc932ec98d46b)
1.Dd January 24, 2024
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.In sqlite3.h
11.Ft sqlite3_vfs *
12.Fo sqlite3_vfs_find
13.Fa "const char *zVfsName"
14.Fc
15.Ft int
16.Fo sqlite3_vfs_register
17.Fa "sqlite3_vfs*"
18.Fa "int makeDflt"
19.Fc
20.Ft int
21.Fo sqlite3_vfs_unregister
22.Fa "sqlite3_vfs*"
23.Fc
24.Sh DESCRIPTION
25A virtual filesystem (VFS) is an sqlite3_vfs object that
26SQLite uses to interact with the underlying operating system.
27Most SQLite builds come with a single default VFS that is appropriate
28for the host computer.
29New VFSes can be registered and existing VFSes can be unregistered.
30The following interfaces are provided.
31.Pp
32The sqlite3_vfs_find() interface returns a pointer to a VFS given its
33name.
34Names are case sensitive.
35Names are zero-terminated UTF-8 strings.
36If there is no match, a NULL pointer is returned.
37If zVfsName is NULL then the default VFS is returned.
38.Pp
39New VFSes are registered with sqlite3_vfs_register().
40Each new VFS becomes the default VFS if the makeDflt flag is set.
41The same VFS can be registered multiple times without injury.
42To make an existing VFS into the default VFS, register it again with
43the makeDflt flag set.
44If two different VFSes with the same name are registered, the behavior
45is undefined.
46If a VFS is registered with a name that is NULL or an empty string,
47then the behavior is undefined.
48.Pp
49Unregister a VFS with the sqlite3_vfs_unregister() interface.
50If the default VFS is unregistered, another VFS is chosen as the default.
51The choice for the new VFS is arbitrary.
52.Sh IMPLEMENTATION NOTES
53These declarations were extracted from the
54interface documentation at line 7911.
55.Bd -literal
56SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
57SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
58SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
59.Ed
60.Sh SEE ALSO
61.Xr sqlite3_vfs 3
62