Skip to content

Commit

Permalink
Quads creator:
Browse files Browse the repository at this point in the history
- Create directories if necessary
  • Loading branch information
JPugetGil committed Sep 16, 2024
1 parent 04d7f6c commit 054bb6a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions quads-creator/src/main/java/fr/vcity/QuadsCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,23 @@ public static void main(String[] args) {
if (inputFile.equals("*")) {
File folder = new File(inputFolder);

// Create the directory if it does not exist
if (folder.mkdirs()) {
log.info("The folder was created successfully");
}

if (folder.exists() && folder.isDirectory()) {
// Get the list of all files and directories in the folder
File[] filesList = folder.listFiles();

// Check if the directory is empty
if (filesList != null && filesList.length > 0) {
if (filesList != null) {
for (File file : filesList) {
if (file.isFile()) {
new RDFConverter(annotationType, annotation, inputFolder, file.getName(), outputFolder)
.convert();
}
}
} else {
log.info("The folder is empty.");
}
} else {
log.info("The specified folder does not exist or is not a directory.");
Expand Down

0 comments on commit 054bb6a

Please sign in to comment.