When I add a new UserDefinedFileAttributeView
attribute to a file, where does Java store this information?
There are no additional files in the directory, the file does not have any new attributes or details when I view the file properties.
My code:
String versionAttrName = "report.version";
try {
Path path = FileSystems.getDefault().getPath(filePath, "");
UserDefinedFileAttributeView view = Files.getFileAttributeView(path, UserDefinedFileAttributeView.class);
view.write(versionAttrName, Charset.defaultCharset().encode(newVersion));
} catch (IOException e) {
System.out.println("7 - Error saving version to file! - "+ filePath + " - " + e.getMessage());
}