RecycleOption 列舉

定義

指定檔案要永久刪除或放在 [資源回收筒] 中。Specifies whether a file should be deleted permanently or placed in the Recycle Bin.

public enum class RecycleOption
public enum RecycleOption
type RecycleOption = 
Public Enum RecycleOption
繼承
RecycleOption

欄位

DeletePermanently 2

永久刪除檔案或目錄。Delete the file or directory permanently. Default:Default.

SendToRecycleBin 3

將檔案或目錄傳送至 [資源回收筒]。Send the file or directory to the Recycle Bin.

備註

這個列舉會與 DeleteDirectoryDeleteFile 方法搭配使用。This enumeration is used with the DeleteDirectory and DeleteFile methods.

為了防止使用者意外刪除重要的檔案,回收站會收集已刪除的檔案,並提供還原這些檔案的方法。To protect users against accidental deletion of important files, the Recycle Bin collects deleted files and provides a method for restoring those files. 您必須明確地刪除回收站中的檔案,才能永久刪除。You must explicitly delete the files from the Recycle Bin to make the deletion permanent. 在從 [回收站] 刪除檔案之前,這些檔案所佔用的磁碟空間無法供其他用途使用。Until the files are deleted from the Recycle Bin, the disk space occupied by those files is unavailable for other uses.

有時候略過回收站是很有説明的,特別是當您要刪除的大量檔案(或數量較少的檔案)已不再需要時,而且您想要回收磁碟空間。Sometimes it is beneficial to bypass the Recycle Bin, especially if you are deleting a large number of files (or a smaller number of very large files) that you are sure are no longer needed, and you want to reclaim the disk space.

適用於

另請參閱