FileLocalDataSource

Functions

Link copied to clipboard
abstract suspend fun addUpdate(fileModel: File)

Add files. If it already exists, update it.

Link copied to clipboard
abstract suspend fun clearCacheKey(bookshelfId: BookshelfId)
Link copied to clipboard
abstract suspend fun count(bookshelfId: BookshelfId): Long
Link copied to clipboard
abstract suspend fun deleteAll(list: List<File>)

Delete all files.

Link copied to clipboard
abstract suspend fun deleteAll2(bookshelfModelId: BookshelfId)
Link copied to clipboard
abstract suspend fun deleteAllHistory()
Link copied to clipboard
abstract suspend fun deleteHistory(bookshelfId: BookshelfId, list: List<String>)
Link copied to clipboard
abstract suspend fun deleteThumbnails()
Link copied to clipboard
abstract suspend fun exists(bookshelfId: BookshelfId, path: String): Boolean

Returns true if the file exists.

Link copied to clipboard
abstract suspend fun fileList(bookshelfId: BookshelfId, limit: Int, offset: Long): List<File>
Link copied to clipboard
abstract suspend fun findBy(bookshelfId: BookshelfId, path: String): File?
Link copied to clipboard
abstract fun flow(bookshelfId: BookshelfId, path: String): Flow<File?>
Link copied to clipboard
abstract suspend fun getCacheKeyList(bookshelfId: BookshelfId): List<String>
Link copied to clipboard
abstract suspend fun getCacheKeys(bookshelfId: BookshelfId, parent: String, limit: Int, folderThumbnailOrderModel: FolderThumbnailOrder): List<String>
Link copied to clipboard
abstract fun lastHistory(): Flow<File?>
Link copied to clipboard
abstract fun nextFileModel(bookshelfId: BookshelfId, path: String, sortType: SortType): Flow<File?>
abstract fun nextFileModel(bookshelfId: BookshelfId, path: String, searchCondition: SearchCondition, sortType: SortType): Flow<File?>
Link copied to clipboard
abstract fun pagingDataFlow(pagingConfig: PagingConfig, bookshelfId: BookshelfId?, searchCondition: () -> SearchCondition): Flow<PagingData<File>>
Link copied to clipboard
abstract fun pagingHistoryBookSource(pagingConfig: PagingConfig): Flow<PagingData<Book>>
Link copied to clipboard
abstract fun pagingSource(bookshelfId: BookshelfId, pagingConfig: PagingConfig): Flow<PagingData<BookThumbnail>>
Link copied to clipboard
abstract fun prevFileModel(bookshelfId: BookshelfId, path: String, sortType: SortType): Flow<File?>
abstract fun prevFileModel(bookshelfId: BookshelfId, path: String, searchCondition: SearchCondition, sortType: SortType): Flow<File?>
Link copied to clipboard
abstract suspend fun removeCacheKey(diskCacheKey: String)
Link copied to clipboard
abstract suspend fun root(id: BookshelfId): Folder?
Link copied to clipboard
abstract suspend fun selectByNotPaths(bookshelfId: BookshelfId, path: String, list: List<String>): List<File>
Link copied to clipboard
abstract suspend fun updateAdditionalInfo(path: String, bookshelfId: BookshelfId, cacheKey: String, totalPage: Int)

Update additional information in the file.

Link copied to clipboard
abstract suspend fun updateFileType(file: File)
Link copied to clipboard
abstract suspend fun updateHistory(file: File, files: List<File>)

abstract suspend fun updateHistory(path: String, bookshelfId: BookshelfId, lastReadPage: Int, lastReading: Long)

Update reading history.

Link copied to clipboard
Link copied to clipboard
abstract suspend fun updateSimpleAll(list: List<File>)