diff options
Diffstat (limited to 'src/Utilities/Path.kt')
-rw-r--r-- | src/Utilities/Path.kt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Utilities/Path.kt b/src/Utilities/Path.kt index 24420ec7..973163a8 100644 --- a/src/Utilities/Path.kt +++ b/src/Utilities/Path.kt @@ -3,13 +3,13 @@ package org.jetbrains.dokka import java.io.* fun File.getRelativePath(name: File): File { - val parent = getParentFile() + val parent = parentFile if (parent == null) throw IOException("No common directory"); - val basePath = getCanonicalPath() + File.separator; - val targetPath = name.getCanonicalPath(); + val basePath = canonicalPath + File.separator; + val targetPath = name.canonicalPath; if (targetPath.startsWith(basePath)) { return File(targetPath.substring(basePath.length())) @@ -18,4 +18,4 @@ fun File.getRelativePath(name: File): File { } } -fun File.appendExtension(extension: String) = if (extension.isEmpty()) this else File(getPath() + "." + extension) +fun File.appendExtension(extension: String) = if (extension.isEmpty()) this else File(path + "." + extension) |