Please enable JavaScript.
Coggle requires JavaScript to display documents.
Debug, Path - Coggle Diagram
-
Path
-
-
Đường dẫn tương đối không bao gồm node gốc, phải kết hợp với đường dẫn khác để xác định được file
Tạo Path trỏ đến file trong thư mục đang hoạt động
Path path =
FileSystems.getDefault().getPath(“WorkingDirectoryFile.txt”);
Tạo Path trỏ đến thư mục con tại thư mục hiện tại:
Path filePath = FileSystems.getDefault().getPath("files", "SubdirectoryFile.txt");
// thư mục con là files
Tạo Path bằng đường dẫn tuyệt đối:
Path originFilePath = Paths.get("C:/Users/ThuyDuong/Documents/iii.txt");