* added script for deleting xattr metadata
This commit is contained in:
parent
651e0dcc46
commit
fa55b68360
|
@ -80,6 +80,26 @@ public class MetaAttributeView extends AbstractMap<String, String> {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
try {
|
||||
return attributeView.list().size();
|
||||
} catch (IOException e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
try {
|
||||
return attributeView.list().isEmpty();
|
||||
} catch (IOException e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private class AttributeEntry implements Entry<String, String> {
|
||||
|
||||
private final String name;
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
// filebot -script fn:xattr --action clear /path/to/files
|
||||
|
||||
args.getFiles{ it.xattr.size() > 0 }.each{
|
||||
println it
|
||||
it.xattr.each{ k, v ->
|
||||
println "\t$k: $v"
|
||||
}
|
||||
// clear xattr mode
|
||||
if (_args.action == 'clear') {
|
||||
it.xattr.clear()
|
||||
println '*** CLEARED ***'
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue