Re: Check the Jena TDB files exist in a directory
Thank you for your help. Regards Laurent On 28 November 2015 at 11:45, Andy Seabornewrote: > On 28/11/15 06:05, Saikat Maitra wrote: > >> Hi Laurent >> >> You can use dir.listFiles() and it will return list of files in that dir. >> You can iterate over the list to check for any TDB file present and then >> load Dataset from it. >> >> Regards >> Saikat >> > > There will be (next release) "TDBFactory.inUseLocation" which has some > checks, the main one being for the file "tdb.cfg". > > (Older versions of TDB may not have created this file.) > > Andy > > > >> On Fri, Nov 27, 2015 at 2:03 PM, Laurent Rucquoy < >> laurent.rucq...@telemis.com> wrote: >> >> Hello, >>> >>> I want to load a Dataset from a directory but not to create a new one if >>> there is no TDB files in this directory. Is there a way to check that TDB >>> files effectively exist in a directory or to load a Dataset while >>> preventing to create files on disk if they don't exist ? >>> >>> Thank you. >>> >>> Sincerely, >>> Laurent >>> >>> >> >
Re: Check the Jena TDB files exist in a directory
On 28/11/15 06:05, Saikat Maitra wrote: Hi Laurent You can use dir.listFiles() and it will return list of files in that dir. You can iterate over the list to check for any TDB file present and then load Dataset from it. Regards Saikat There will be (next release) "TDBFactory.inUseLocation" which has some checks, the main one being for the file "tdb.cfg". (Older versions of TDB may not have created this file.) Andy On Fri, Nov 27, 2015 at 2:03 PM, Laurent Rucquoy < laurent.rucq...@telemis.com> wrote: Hello, I want to load a Dataset from a directory but not to create a new one if there is no TDB files in this directory. Is there a way to check that TDB files effectively exist in a directory or to load a Dataset while preventing to create files on disk if they don't exist ? Thank you. Sincerely, Laurent
Re: Check the Jena TDB files exist in a directory
Hi Laurent You can use dir.listFiles() and it will return list of files in that dir. You can iterate over the list to check for any TDB file present and then load Dataset from it. Regards Saikat On Fri, Nov 27, 2015 at 2:03 PM, Laurent Rucquoy < laurent.rucq...@telemis.com> wrote: > Hello, > > I want to load a Dataset from a directory but not to create a new one if > there is no TDB files in this directory. Is there a way to check that TDB > files effectively exist in a directory or to load a Dataset while > preventing to create files on disk if they don't exist ? > > Thank you. > > Sincerely, > Laurent >
Check the Jena TDB files exist in a directory
Hello, I want to load a Dataset from a directory but not to create a new one if there is no TDB files in this directory. Is there a way to check that TDB files effectively exist in a directory or to load a Dataset while preventing to create files on disk if they don't exist ? Thank you. Sincerely, Laurent