本地书籍无权限则保存到自己选定的文件夹

This commit is contained in:
gedoor 2021-12-31 17:34:10 +08:00
parent d3c8530556
commit 020adf45ef
2 changed files with 0 additions and 8 deletions

View File

@ -72,13 +72,6 @@ object LocalBook {
path = uri.toString()
val doc = DocumentFile.fromSingleUri(appCtx, uri)!!
updateTime = doc.lastModified()
val bookFile = cacheFolder.getFile(doc.name!!)
if (!bookFile.exists()) {
bookFile.createNewFile()
doc.readBytes(appCtx).let { bytes ->
bookFile.writeBytes(bytes)
}
}
doc.name!!
} else {
path = uri.path!!

View File

@ -51,7 +51,6 @@ class TextFile(private val book: Book) {
}
}
@Throws(FileNotFoundException::class)
private fun analyze(
bookFd: FileDescriptor,
book: Book,