compatibility constructor for sysinfo.groovy script

This commit is contained in:
Reinhard Pointner 2016-08-15 22:14:03 +08:00
parent 2bcb574f28
commit 226559683b
1 changed files with 5 additions and 0 deletions

View File

@ -25,6 +25,11 @@ public class MetaAttributes {
private final Map<String, String> jsonTypeMap; private final Map<String, String> jsonTypeMap;
// compatibility constructor for sysinfo.groovy script
public MetaAttributes(File file) throws IOException {
this(file, emptyMap());
}
public MetaAttributes(File file, Map<String, String> jsonTypeMap) throws IOException { public MetaAttributes(File file, Map<String, String> jsonTypeMap) throws IOException {
this.metaAttributeView = new MetaAttributeView(file); this.metaAttributeView = new MetaAttributeView(file);
this.fileAttributeView = Files.getFileAttributeView(file.toPath(), BasicFileAttributeView.class); this.fileAttributeView = Files.getFileAttributeView(file.toPath(), BasicFileAttributeView.class);