mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-12-21 08:07:16 +00:00
fix build and add filestandardkeyvaluerepo unsetWithValues realization
This commit is contained in:
parent
091cb38339
commit
5fc760f4a5
@ -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")
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user