Using Java's File.delete() method

前端 未结 4 1724
终归单人心
终归单人心 2020-12-21 12:18

When I used the File.delete() method to delete a file, where is the deleted file? I am using a Mac and I don\'t see the file in the Trash. I want to know where

4条回答
  •  春和景丽
    2020-12-21 13:02

    The trash in Mac/Linux (or Recycle Bin, in Windows) only work with the specific file managers (Finder, Nautilus/Dolphin or Explorer) where they actually move a file into a temporary folder on the same partition (aka Trash / Recycle Bin), from where it's deleted.

    From the core OS's point of you, delete() will permanently delete it.

提交回复
热议问题