diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-09-11 16:45:11 +0200 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-09-11 16:45:11 +0200 |
commit | 757f72db456cf4dd12b0cfdbf312752d5951f166 (patch) | |
tree | e616cee86448fc9ae12c9cf67f27abecef0755f1 /src/Utilities | |
parent | e67ee4136f69ad2c8ef65c4978465f43717517d2 (diff) | |
download | dokka-757f72db456cf4dd12b0cfdbf312752d5951f166.tar.gz dokka-757f72db456cf4dd12b0cfdbf312752d5951f166.tar.bz2 dokka-757f72db456cf4dd12b0cfdbf312752d5951f166.zip |
M13 code cleanup
Diffstat (limited to 'src/Utilities')
-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) |