From 757f72db456cf4dd12b0cfdbf312752d5951f166 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Fri, 11 Sep 2015 16:45:11 +0200 Subject: M13 code cleanup --- src/Utilities/Path.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Utilities') 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) -- cgit