diff --git a/src/main/kotlin/app/revanced/patcher/data/impl/ResourceData.kt b/src/main/kotlin/app/revanced/patcher/data/impl/ResourceData.kt index 4ed7bb4..c02b031 100644 --- a/src/main/kotlin/app/revanced/patcher/data/impl/ResourceData.kt +++ b/src/main/kotlin/app/revanced/patcher/data/impl/ResourceData.kt @@ -15,16 +15,6 @@ class ResourceData(private val resourceCacheDirectory: File) : Data { fun forEach(action: (File) -> Unit) = resourceCacheDirectory.walkTopDown().forEach(action) fun get(path: String) = resolve(path) - fun replace(path: String, oldValue: String, newValue: String, oldValueIsRegex: Boolean = false) { - // TODO: buffer this somehow - val content = resolve(path).readText() - - if (oldValueIsRegex) { - content.replace(Regex(oldValue), newValue) - return - } - } - fun getXmlEditor(path: String) = DomFileEditor(resolve(path)) } diff --git a/src/test/kotlin/app/revanced/patcher/usage/resource/patch/ExampleResourcePatch.kt b/src/test/kotlin/app/revanced/patcher/usage/resource/patch/ExampleResourcePatch.kt index 4a9d535..3d0f33f 100644 --- a/src/test/kotlin/app/revanced/patcher/usage/resource/patch/ExampleResourcePatch.kt +++ b/src/test/kotlin/app/revanced/patcher/usage/resource/patch/ExampleResourcePatch.kt @@ -30,18 +30,6 @@ class ExampleResourcePatch : ResourcePatch() { ) } - // iterate through all available resources - data.forEach { - if (it.extension.lowercase() != "xml") return@forEach - - data.replace( - it.path, - "\\ddip", // regex supported - "0dip", - true - ) - } - return PatchResultSuccess() } } \ No newline at end of file