×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Himesh Sharma
Added: Mar 24, 2021 6:57 PM
Views: 4538
Tags: createdir file
  1. Path bkDir = Paths.get("./bak/logfile.txt");
  2. if (!Files.exists(bkDir, new LinkOption[]{LinkOption.NOFOLLOW_LINKS})) {
  3.          Files.createDirectory(bkDir);
  4. }