Skip to content

Commit 80b6d60

Browse files
committed
FIX: Quads creator
- Create directories if necessary
1 parent 054bb6a commit 80b6d60

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

quads-creator/src/main/java/fr/vcity/QuadsCreator.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ public static void main(String[] args) {
2121
String annotationType = args[3]; // 4th argument: annotation type
2222
String annotation = args[4]; // 5th argument: annotation type
2323

24+
File outputF = new File(outputFolder);
25+
26+
// Create the directory if it does not exist
27+
if (outputF.mkdirs()) {
28+
log.info("The folder ({}) was created successfully", outputF.getAbsolutePath());
29+
}
30+
2431
if (inputFile.equals("*")) {
2532
File folder = new File(inputFolder);
2633

27-
// Create the directory if it does not exist
28-
if (folder.mkdirs()) {
29-
log.info("The folder was created successfully");
30-
}
31-
3234
if (folder.exists() && folder.isDirectory()) {
3335
// Get the list of all files and directories in the folder
3436
File[] filesList = folder.listFiles();
@@ -43,13 +45,13 @@ public static void main(String[] args) {
4345
}
4446
}
4547
} else {
46-
log.info("The specified folder does not exist or is not a directory.");
48+
log.info("The specified folder ({}) does not exist or is not a directory.", folder.getAbsolutePath());
4749
}
4850
} else {
4951
new RDFConverter(annotationType, annotation, inputFolder, inputFile, outputFolder)
5052
.convert();
5153
}
5254

53-
log.info("Quads saved to {}", outputFolder);
55+
log.info("Quads saved to {}", outputF.getAbsolutePath());
5456
}
5557
}

0 commit comments

Comments
 (0)