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