【发布时间】:2021-11-02 15:33:51
【问题描述】:
我想从内部存储文件目录加载一个文件。我尝试以这种方式指定路径:
File("${context.filesDir.absolutePath}/zipfile.zip/name.png")
但我收到错误:No such file or directory。
有没有办法指定name.png的路径而不用ZipFile类解压?
【问题讨论】:
-
这能回答你的问题吗? Android list files in specific zip folder
-
非常糟糕,它每次需要一个文件时都会扫描 zip 来查找文件。它需要使用 ZipFile 和 ZipEntry 类或使用我的答案的未来问题!
标签: android file kotlin zip android-internal-storage