Yeah, in my project I just check if the file content starts with this string
to see if it's a Sqlite3 file.

I don't think of a way that could guarantee the "unambiguously".


2009/8/7 P Kishor <punk.k...@gmail.com>

> On Thu, Aug 6, 2009 at 11:36 AM, luc.moulinier<luc.moulin...@laposte.net>
> wrote:
> > Hello !
> >
> > I'd like to know what is the best way to know if a file is a sqlite DB or
> not (without launching sqlite of course) ? For example, is the first line of
> the file unambiguously a signature of sqlite ? If so, what is its structure
> ?
>
> 'SQLite format 3'
>
> although, I am not sure what you expect from 'unambiguously'? I mean,
> while all files created by sqlite3 will start with the above string,
> that doesn't stop me or you from creating a spurious binary file that
> will start with the same string.
>
> Recognize at your own risk.
>
> > Many thanks in advance !
> > Luc
> >
> >
> >  Créez votre adresse électronique prenom....@laposte.net
> >  1 Go d'espace de stockage, anti-spam et anti-virus intégrés.
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >
>
>
>
> --
> Puneet Kishor http://www.punkish.org
> Carbon Model http://carbonmodel.org
> Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
> Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
> Nelson Institute, UW-Madison http://www.nelson.wisc.edu
> -----------------------------------------------------------------------
> Assertions are politics; backing up assertions with evidence is science
> =======================================================================
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to