1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-25 17:28:51 -05:00

* File.relativize

This commit is contained in:
Reinhard Pointner 2014-01-10 16:03:13 +00:00
parent 1e9d0899b0
commit 03db21ff20

View File

@ -47,6 +47,7 @@ File.metaClass.validateFilePath = { validateFilePath(delegate) }
File.metaClass.moveTo = { f -> moveRename(delegate, f as File) }
File.metaClass.copyTo = { dir -> copyAs(delegate, new File(dir, delegate.getName())) }
File.metaClass.getXattr = { new net.sourceforge.filebot.MetaAttributeView(delegate) }
File.metaClass.relativize = { f -> delegate.canonicalFile.toPath().relativize(f.canonicalFile.toPath()).toFile() }
List.metaClass.mapByFolder = { mapByFolder(delegate) }
List.metaClass.mapByExtension = { mapByExtension(delegate) }
String.metaClass.getNameWithoutExtension = { getNameWithoutExtension(delegate) }