How to get location of Neo4j 'imports' folder of a DB programmatically?

Hi,

I am using Neo4j Desktop 1.3.11 on Windows.
Am using apoc.export.csv.query() to get my query results via py2neo. This outputs the csv file to the "import" folder of the DB.

Understand it is possible to navigate to the DB's "import" folder by clicking the 'Open Folder' button in Neo4j Desktop. However, I would like to do so programmatically, since my program is aware of the DB's name e.g. neo4j-db, instead of manually specifying the DB's folder location, which naming can be quite obtuse e.g. C:\Users\[username]\AppData\Local\Neo4j\Relate\Data\dbmss\dbms-db3c8764-9a9c-xxx

I did a couple of searches on Google as one in this community forum, but didn't find anything that can do that.

Is there a way, perhaps to call the system graph to check the folder path?
Or perhaps I'm asking the wrong qn -> Is there a way to specify an arbitrary location in Windows to output my csv?

For Version 5.1.0 we should use server.directories.neo4j_home instead of home.directories.neo4j_home

This solution seems like it may evolve over time. I found a working solution for v1.5.4 by investigating the configs with this query

CALL dbms.listConfig()
YIELD name, value
WHERE name CONTAINS 'import'
RETURN name, value
ORDER BY name
LIMIT 40;

And that led me to the name of the config at this time. So this gives me the location of the local import directory in one shot:

CALL dbms.listConfig()
YIELD name, value
WHERE name = 'server.directories.import'
RETURN value