-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfileGenerator.java
More file actions
34 lines (21 loc) · 821 Bytes
/
Copy pathfileGenerator.java
File metadata and controls
34 lines (21 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
public class fileGenerator {
public static void generateDirectory() {
try {
// Set a path of the directory to save
Path path = Paths.get("C:/Users/jeons/OneDrive/Desktop/CSE_Slide_Sample");
//java.nio.file.Files;
Files.createDirectories(path);
// Success message
System.out.println("Directory is created!");
} catch (IOException e) {
System.err.println("Failed to create directory!" + e.getMessage());
}
}
public static void main(String[] args) throws FileNotFoundException {
}
}