简体   繁体   English

Android:如何找出内部存储中有多少个文件?

[英]Android: How to find out how many files are in the internal storage?

How to find out how many files there are in the internal storage?如何找出内部存储中有多少个文件?

Path:小路:

data->user->0->name of your app->files->your files

context.filesDir.listFiles()

edit: once you have that list you have to traverse the tree and count all the files on the way编辑:一旦你有了那个列表,你必须遍历树并计算路上的所有文件

this.getFilesDir().listFiles().length // delievers the amount of files in the files folder.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM