Android Get Application's 'Home' Data Directory

后端 未结 3 2169
情书的邮戳
情书的邮戳 2020-12-01 00:15

A simple question, relating to the default \'home\' directory when an app writes to the internal memory. By default, any files created are placed by the OS (2.2) in:

3条回答
  •  生来不讨喜
    2020-12-01 00:44

    You can try Context.getApplicationInfo().dataDir if you want the package's persistent data folder.

    getFilesDir() returns a subroot of this.

提交回复
热议问题