1

Why does android allow delete a file, although it is being used by another application? For example: I have a mp3 file on sdcard, I use mp3 player to play it, and then I open a File Manager app and browse to that file; delete it successfully.

If on windows, a message will be displayed and we can't do that. Why does the android operating system not?

I don't know the principle of file management on android os. Does anyone have document about it? Help me please!

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
TanLoc
  • 49
  • 2

1 Answers1

1

Going with the information from here (similar query to yours), linux file deletion only removes the pointers to the file until the last process using that file is complete. At this point the contents of the file are freed.

What this means is that the following should not work:

  • Play an MP3 file from the SDcard.
  • Open up file manager app and delete said MP3 file.
  • After MP3 file finishes, attempt to play it again.
Marvin Pinto
  • 30,138
  • 7
  • 37
  • 54