Hi Bram,
I am trying to check if a database is already build.
Maybe db:exists does what you need [1]? If you always want to create a database that does not exist, the CHECK command [2] could be another option.
Cheers, Christian
[1] http://docs.basex.org/wiki/Database_Module#db:exists [2] http://docs.basex.org/wiki/Commands#CHECK
I thought a good
way would be to check if the path to the database already exists on the file system. However, not wanting to hard-code each single path for each different basex instance, I was wondering if there is a way to get the DBPATH variable that is set in the .basex file. Note that I need to retrieve this information before opening the database itself: when running a Session, I need to check if a database exists on the DBPATH as specified in that Session’s variables.
I’ve been looking in the methods of the BaseX client for Perl, and in the available commands on the wiki but I cannot find a way to retrieve these ‘Session Globals’. Is there a way? Or any other way to check if the database already exists?
Thank you in advance
Bram