mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2026-11-06 12:03:53 +00:00
fix build and add filestandardkeyvaluerepo unsetWithValues realization
This commit is contained in:
1 parent
091cb38339
commit
5fc760f4a5
2 files changed
+13
No files matched your search
+12
@@ -160,6 +160,18 @@ class FileWriteStandardKeyValueRepo(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun unsetWithValues(toUnset: List<File>) {
|
||||
val keys = toUnset.mapNotNull { v ->
|
||||
val key = v.absolutePath.removePrefix(folder.absolutePath)
|
||||
if (key != v.absolutePath) {
|
||||
key
|
||||
} else {
|
||||
null
|
||||
}
|
||||
}
|
||||
unset(keys)
|
||||
}
|
||||
}
|
||||
|
||||
@Warning("Files watching will not correctly works on Android Platform with version of API lower than API 26")
|
||||
|
||||
+1
@@ -7,6 +7,7 @@ import dev.inmo.micro_utils.repos.*
|
||||
import io.ktor.client.HttpClient
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@Suppress("DELEGATED_MEMBER_HIDES_SUPERTYPE_OVERRIDE")
|
||||
class KtorStandartKeyValueRepo<K, V> (
|
||||
baseUrl: String,
|
||||
baseSubpart: String,
|
||||
|
||||
Reference in new issue
Block a user