Skip to content

Commit

Permalink
Remove unnecessary method FileSource.asFile
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtSilvio committed Jan 24, 2024
1 parent 15eccb7 commit 82e1bd5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,5 @@ private fun <T> findMatch(patterns: List<Pair<GlobMatcher, T>>, path: String, de
private fun String.addDirectorySlash() = if (isEmpty()) "" else "$this/"

private class FileSourceAdapter(private val fileTreeElement: FileTreeElement) : FileSource {
override fun asFile() = fileTreeElement.file
override fun copyTo(output: OutputStream) = fileTreeElement.copyTo(output)
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.github.sgtsilvio.gradle.oci.internal.copyspec

import java.io.File
import java.io.OutputStream
import java.time.Instant

Expand All @@ -22,6 +21,5 @@ internal data class FileMetadata(
)

internal interface FileSource {
fun asFile(): File
fun copyTo(output: OutputStream)
}

0 comments on commit 82e1bd5

Please sign in to comment.