mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2024-11-10 01:02:22 +01: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
1 changed files with 1 additions and 2 deletions
|
@ -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…
Reference in a new issue