Skip to content

Commit

Permalink
refactor: use resourceData.get(path) instead of a reader/writer
Browse files Browse the repository at this point in the history
Signed-off-by: oSumAtrIX <[email protected]>
  • Loading branch information
oSumAtrIX committed May 23, 2022
1 parent 40b1fa4 commit 266d681
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ class ResourceData(private val resourceCacheDirectory: File) : Data {
private fun resolve(path: String) = resourceCacheDirectory.resolve(path)

fun forEach(action: (File) -> Unit) = resourceCacheDirectory.walkTopDown().forEach(action)
fun reader(path: String) = resolve(path).reader()
fun writer(path: String) = resolve(path).writer()
fun get(path: String) = resolve(path)

fun replace(path: String, oldValue: String, newValue: String, oldValueIsRegex: Boolean = false) {
// TODO: buffer this somehow
Expand Down

0 comments on commit 266d681

Please sign in to comment.