Locate the data folder which contains the primary set of LST data. This defaults to the data folder under the current directory but can be customized in the config.ini folder. @return The path of the data folder.
()
| 471 | * @return The path of the data folder. |
| 472 | */ |
| 473 | public static String findDataFolder() |
| 474 | { |
| 475 | // Set the pcc location to "data" |
| 476 | String pccLoc = "data"; |
| 477 | |
| 478 | // Read in config.ini and override the pcc location if it exists |
| 479 | try (var lines = Files.lines(Path.of("config.ini"))) |
| 480 | { |
| 481 | var pccFilesPath = lines |
| 482 | .filter(line -> line.startsWith("pccFilesPath=")) |
| 483 | .map(line -> line.substring(13)) |
| 484 | .findFirst() |
| 485 | .orElse(pccLoc); |
| 486 | |
| 487 | return pccFilesPath; |
| 488 | } catch (IOException e) |
| 489 | { |
| 490 | // Ignore, see method comment |
| 491 | } |
| 492 | return pccLoc; |
| 493 | } |
| 494 | |
| 495 | /** |
| 496 | * Write a settings/config file for use by unit tests. |
no test coverage detected