refactor: use resourceData.get(path) instead of a reader/writer

Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
oSumAtrIX 2022-05-24 01:41:48 +02:00
parent 4f60bea81e
commit 0ebdb100fd
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4

View file

@ -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