Skip to contents

Searches the plausible database locations and returns the path to the first duckdb file that exists.

Usage

findDatabase(
  dbName = NULL,
  folder = "IMR_biotic_BES_database",
  root = "Fiskwise_data"
)

Arguments

dbName

Character string or NULL giving the name of the database file without the .duckdb extension. If NULL uses the default name ("bioticexplorer").

folder

Character string giving the name of the database folder. Defaults to "IMR_biotic_BES_database".

root

Character string giving the shared data folder inside the user's home directory that holds folder. Defaults to "Fiskwise_data", the folder in which Fiskwise keeps all its local databases. Use NULL or "" to place folder directly in the home directory (the layout used before BioticExplorerServer 0.8.14).

Value

Character string giving the absolute path to an existing .duckdb file, or NULL if no database was found.

Details

Checks dbPathCandidates in order, so a database installed to the current default takes precedence over one left in a legacy location. Intended for downstream code, such as BioticExplorer, which has to find a database it did not compile itself.

AI assistance

Written with Claude Opus 5.5 (Anthropic); reviewed in full by Claude Opus 5.5 (Anthropic), 2026-11-20.

Author

Mikko Vihtakari (Institute of Marine Research)

Examples

findDatabase()
#> NULL