Minor tweaks to KonanLibrary.

This commit is contained in:
Alexander Gorshenev
2017-05-19 00:19:46 +03:00
committed by alexander-gorshenev
parent 6c00815968
commit b0d27820c8
2 changed files with 3 additions and 7 deletions
@@ -118,16 +118,12 @@ class SplitLibraryReader(override val libDir: File, configuration: CompilerConfi
if (!libDir.exists) error("Could not unpack $klibFile as $libDir.") if (!libDir.exists) error("Could not unpack $klibFile as $libDir.")
} else { } else {
error("Expected $klibFile to be a regular libDir.") error("Expected $klibFile to be a regular file.")
} }
} }
private val File.dirAbsolutePaths: List<String>
get() = this.listFiles!!.toList()!!.map{it->it.absolutePath}
override val bitcodePaths: List<String> override val bitcodePaths: List<String>
get() = kotlinDir.dirAbsolutePaths + get() = (kotlinDir.listFiles + nativeDir.listFiles).map{it.absolutePath}
nativeDir.dirAbsolutePaths
} }
/* ------------ writer part ----------------*/ /* ------------ writer part ----------------*/
@@ -45,7 +45,7 @@ class File(val path: String) {
val isFile val isFile
get() = javaFile.isFile() get() = javaFile.isFile()
val listFiles val listFiles
get() = javaFile.listFiles() get() = javaFile.listFiles()!!.toList()
fun mkdirs() = javaFile.mkdirs() fun mkdirs() = javaFile.mkdirs()
fun delete() = javaFile.delete() fun delete() = javaFile.delete()