compile-time проверка IStorageInfo

This commit is contained in:
Roman Pytkov
2025-01-04 04:31:08 +03:00
parent 72bac5e3da
commit c653e3620b

View File

@@ -9,9 +9,9 @@ class StorageFileManagementUseCase {
private var _storage: IStorage? = null private var _storage: IStorage? = null
fun setStorage(storage: IStorageInfo) { fun setStorage(storage: IStorageInfo) {
//if(storage !is IStorage) when (storage) {
// throw Exception("Can not manage storage on StorageInfo") is IStorage -> _storage = storage
_storage = storage as IStorage }
} }
suspend fun getAllFiles(): List<IFile> { suspend fun getAllFiles(): List<IFile> {