Recommend this page to a friend! |
Classes of Damir | SQLite3 checker | readme.md | Download |
|
DownloadSQLite3 checkerThis is simple class that allows search for SQLite3 files somewhere in file system. It happens, especially if software deals with beginers, that some created databases were dispersed over unknown destinations. To make things more difficult, SQLite3 database could exists with various extensions, even without them. So, it is not posible to determine if something is SQLite3 file just on extension basis. So, this class checks first 100 bytes of suspiction file and find out is it SQLite3 file. Example 1:This code:
would make this result: <pre> Database1:../..\db\ELSE.db Database2:../..\db\MultiLang.db Array ( [0] => SQLite format 3 [1] => [2] => [3] => [4] => [5] => @ [6] => [7] => [8] => [9] => [10] => [11] => [12] => [13] => [14] => [15] => [16] => [17] => [18] => [19] => [20] => [21] => [22] => -? ) ../..\db\ELSE.db 1 Array ( [0] => SQLite format 3 [1] => [2] => [3] => [4] => [5] => @ [6] => [7] => [8] => b [9] => [10] => [11] => [12] => [13] => [14] => [15] => [16] => [17] => [18] => [19] => [20] => [21] => [22] => ) ../..\db\MultiLang.db3 1 </pre> Example 2:Almost same code:
would make this result: <pre> Database1:../../..\repo\db\ELSE.db Database2:../../..\repo\db\MultiLang.db Database3:../../..\ucenici\franezidic\Db\MultiLang.db Database4:../../..\ucenici\jadrankotudovic\Db\MultiLang.db Array ( [0] => SQLite format 3 [1] => [2] => [3] => [4] => [5] => @ [6] => [7] => [8] => [9] => [10] => [11] => [12] => [13] => [14] => [15] => [16] => [17] => [18] => [19] => [20] => [21] => [22] => -? ) ../../..\repo\db\ELSE.db 1 Array ( [0] => SQLite format 3 [1] => [2] => [3] => [4] => [5] => @ [6] => [7] => [8] => b [9] => [10] => [11] => [12] => [13] => [14] => [15] => [16] => [17] => [18] => [19] => [20] => [21] => [22] => ) ../../..\repo\db\MultiLang.db3 1 Array ( [0] => SQLite format 3 [1] => [2] => [3] => [4] => [5] => @ [6] => [7] => [8] => b [9] => [10] => [11] => [12] => [13] => [14] => [15] => [16] => [17] => [18] => [19] => [20] => [21] => [22] => ) ../../..\ucenici\franezidic\Db\MultiLang.db3 1 Array ( [0] => SQLite format 3 [1] => [2] => [3] => [4] => [5] => @ [6] => [7] => [8] => b [9] => [10] => [11] => [12] => [13] => [14] => [15] => [16] => [17] => [18] => [19] => [20] => [21] => [22] => ) ../../..\ucenici\jadrankotudovic\Db\MultiLang.db3 1 </pre> |