Check for file existence in androids assets folder?

前端 未结 6 1252
不思量自难忘°
不思量自难忘° 2020-12-30 19:33

My app has .txt files in subdirectories in the assets folder. It reads those .txt files and puts them in a textview. It\'s working great and no problems.

Should I be

6条回答
  •  情歌与酒
    2020-12-30 19:53

    You may be concerned that the file have been removed and the apk resigned

    You can check using:

    Arrays.asList(getResources().getAssets().list("")).contains("myFile")
    

提交回复
热议问题