为什么安卓允许删除文件正在使用.....? [英] Why does android allow delete a file that being used .....?

查看:343
本文介绍了为什么安卓允许删除文件正在使用.....?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么安卓允许删除一个文件,但它正被另一个应用程序?
例如:我有一个SD卡的MP3文件,我使用的MP3播放器来播放它,然后我打开一个文件管理器应用程序,浏览到该文件;成功地将其删除。

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.

如果在Windows中,将显示一条消息,我们不能这样做。
为什么Android操作系统呢?

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

我不知道档案管理对Android操作系统的原则。
有没有人有关于它的文件?请帮助我!

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

推荐答案

从上面的信息来自的删除文件的仅删除指向该文件,直到最后的处理的使用10211相对=nofollow>这里(类似查询到你),LINUX文件是完整的。在这一点上的文件的的的内容将被释放。

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:


  • 从SD卡播放MP3文件。

  • 打开了文件管理器应用程序,并删除MP3表示文件。

  • MP3文件完成后,尝试再次播放它。

这篇关于为什么安卓允许删除文件正在使用.....?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆