1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
.Dd January 24, 2024
.Dt SQLITE3_FILENAME_DATABASE 3
.Os
.Sh NAME
.Nm sqlite3_filename_database ,
.Nm sqlite3_filename_journal ,
.Nm sqlite3_filename_wal
.Nd translate filenames
.Sh SYNOPSIS
.In sqlite3.h
.Ft const char *
.Fo sqlite3_filename_database
.Fa "sqlite3_filename"
.Fc
.Ft const char *
.Fo sqlite3_filename_journal
.Fa "sqlite3_filename"
.Fc
.Ft const char *
.Fo sqlite3_filename_wal
.Fa "sqlite3_filename"
.Fc
.Sh DESCRIPTION
These routines are available to custom VFS implementations
for translating filenames between the main database file, the journal
file, and the WAL file.
.Pp
If F is the name of an sqlite database file, journal file, or WAL file
passed by the SQLite core into the VFS, then sqlite3_filename_database(F)
returns the name of the corresponding database file.
.Pp
If F is the name of an sqlite database file, journal file, or WAL file
passed by the SQLite core into the VFS, or if F is a database filename
obtained from
.Fn sqlite3_db_filename ,
then sqlite3_filename_journal(F) returns the name of the corresponding
rollback journal file.
.Pp
If F is the name of an sqlite database file, journal file, or WAL file
that was passed by the SQLite core into the VFS, or if F is a database
filename obtained from
.Fn sqlite3_db_filename ,
then sqlite3_filename_wal(F) returns the name of the corresponding
WAL file.
.Pp
In all of the above, if F is not the name of a database, journal or
WAL filename passed into the VFS from the SQLite core and F is not
the return value from
.Fn sqlite3_db_filename ,
then the result is undefined and is likely a memory access violation.
.Sh IMPLEMENTATION NOTES
These declarations were extracted from the
interface documentation at line 3826.
.Bd -literal
SQLITE_API const char *sqlite3_filename_database(sqlite3_filename);
SQLITE_API const char *sqlite3_filename_journal(sqlite3_filename);
SQLITE_API const char *sqlite3_filename_wal(sqlite3_filename);
.Ed
.Sh SEE ALSO
.Xr sqlite3_db_filename 3
|