On Thu, 6 Apr 2017 13:19:38 +0100
Simon Slavin <slav...@bigfraud.org> wrote:

> Instead use PHP functions to check that the file exists using PHP
> function "file_exists()" and then using fread() to read the first 16
> bytes from it.  Those 16 bytes should be "SQLite format 3" followed
> by a 0x00 byte for a string terminator.

Wouldn't it better to use a URI filename for sqlite3_open_v2 with
mode=rw?  

Suggestion to developers: it might be nice to have a version of
sqlite3_open that takes a file descriptor as a parameter instead of
a filename.  The caller could then set the open mode (and, for a new
file, permissions) by conventional means, and then open the database. 

--jkl

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to