Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在将文件保存到内部存储中,现在我想删除它。问题是,我不记得该文件的名称,所以我不能使用这种myContext.deleteFile(fileName);方法。如何获取该文件的名称并将其删除?
myContext.deleteFile(fileName);
当您使用 Context 中的文件方法时,Android 将该文件保存到应用程序的目录中(并对其进行加密,与 File.()) 方法相比)。因此,您只需清除应用程序数据,该文件就会被删除