mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-04-30 21:34:25 +02:00
refactor: use resourceData.get(path)
instead of a reader/writer
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
parent
4f60bea81e
commit
0ebdb100fd
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user