Checks if one of the files .basexhome or .basex are found in the specified directory. @param dir directory (can be null) @return configuration directory (can be null)
(final String dir)
| 119 | * @return configuration directory (can be {@code null}) |
| 120 | */ |
| 121 | private static String configDir(final String dir) { |
| 122 | if(dir != null) { |
| 123 | final String home = IO.BASEXSUFFIX + "home"; |
| 124 | final IOFile file = new IOFile(dir, home); |
| 125 | if(file.exists() || new IOFile(dir, IO.BASEXSUFFIX).exists()) return dir; |
| 126 | } |
| 127 | return null; |
| 128 | } |
| 129 | |
| 130 | /** |
| 131 | * Returns the application directory. |