问题
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