Skip to content

Commit

Permalink
Fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
eirikvaa committed Mar 8, 2025
1 parent b6a950e commit 8142e7e
Showing 1 changed file with 13 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,19 @@ internal actual class PlatformFileInputOutputImpl : PlatformFileInputOutput {

override fun toString(): String = PLATFORM_JVM

private fun filesImpl(
path: String,
date: LogDate?,
): Collection<String> = ArrayList<String>(INITIAL_ARRAY_SIZE).apply {
val filePath = File(path)
val fileWalker = filePath.walkTopDown()
val iterator = fileWalker.iterator()

while (iterator.hasNext()) {
val file = iterator.next()
val canonicalPath = file.canonicalPath

if (!file.isDirectory && canonicalPath.isNotBlank() && file.name.ifAfter(date)) {
add(canonicalPath)
private fun filesImpl(path: String, date: LogDate?): Collection<String> =
ArrayList<String>(INITIAL_ARRAY_SIZE).apply {
val filePath = File(path)
val fileWalker = filePath.walkTopDown()
val iterator = fileWalker.iterator()

while (iterator.hasNext()) {
val file = iterator.next()
val canonicalPath = file.canonicalPath

if (!file.isDirectory && canonicalPath.isNotBlank() && file.name.ifAfter(date)) {
add(canonicalPath)
}
}
}
}
}

0 comments on commit 8142e7e

Please sign in to comment.