Difference between getExternalStorageDirectory and getExternalStoragePublicDirectory?

☆樱花仙子☆ 提交于 2019-12-11 01:43:28

问题


According to google one returns the primary shared/external storage directory and the other gets a top-level shared/external storage directory for placing files of a particular type. Can anyone explain in simple language and example?


回答1:


I am going to assume that you have used a Windows computer sometime in your life.

Environment.getExternalStorageDirectory(), if this were Windows, would return C:\.

Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES), if this were Windows, would return some standard location on the C:\ drive where the user would typically look to find saved movies.



来源:https://stackoverflow.com/questions/44178065/difference-between-getexternalstoragedirectory-and-getexternalstoragepublicdirec

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!