0

I want to load a File from the Internal Storage file directory. I try to specify the path in this way:

File("${context.filesDir.absolutePath}/zipfile.zip/name.png")

but I receive the error: No such file or directory.

There is a way to specify the path of name.png without unzipping it with ZipFile class?

Simone
  • 425
  • 1
  • 6
  • 17
  • Does this answer your question? [Android list files in specific zip folder](https://stackoverflow.com/questions/33383492/android-list-files-in-specific-zip-folder) – javdromero Sep 04 '21 at 22:44
  • Very bad, it scan the zip to find a file every time it needs one. It needs to use ZipFile and ZipEntry class or use a future question of my answer! – Simone Sep 04 '21 at 22:58

1 Answers1

1

There is a way to specify the path of name.png without unzipping it with ZipFile class?

No, sorry. Android treats ZIP files fairly conventionally. If you want to access its contents, use ZipFile, ZipInputStream, or similar classes.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491