I have a method that receives a route to create a file in this and of course the directory I do it in this way.
public static File createTempFile(String exteString, String nombre, String path) throws IOException {
try {
File file = new File(path + "\" + nombre + exteString);
//--
Path toCreatePath = Paths.get(file.toURI());
if (!Files.exists(toCreatePath)) {
Files.createDirectories(toCreatePath);
}
return file;
} catch (IOException e) {
System.out.println(ReportLog.getErrorBuilder(new Object(), e));
}
return null;
}
My problem is that I need somehow to hide this directory , that is, it can not be seen by the user , since it is going to contain secret information
(not explicitly confidential information only information not redundant for the user)
I think it's possible since the class Files
contains the method isHidden
but I still do not know how to tell the directory to be hidden.