Android: How to detect a directory in the assets folder?

前端 未结 9 1260
无人及你
无人及你 2021-01-05 18:15

I\'m retrieving files like this

String[] files = assetFiles.list(\"EngagiaDroid\"); 

How can we know whether it is a file or is a director

9条回答
  •  鱼传尺愫
    2021-01-05 18:52

    You can check if a File represents a directory using http://developer.android.com/reference/java/io/File.html#isDirectory(). Is that what you mean?

提交回复
热议问题