Bagikan melalui


RecycleOption Enumeration

Specifies whether a file should be deleted permanently or placed in the Recycle Bin.

Remarks

This enumeration is used with the My.Computer.FileSystem.DeleteDirectory Method and the My.Computer.FileSystem.DeleteFile Method.

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.

Members

Member

Description

DeletePermanently

Delete the file or directory permanently. Default.

SendToRecycleBin

Send the file or directory to the Recycle Bin.

Requirements

Namespace:Microsoft.VisualBasic.FileIO

Class:RecycleOption

Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)

See Also

Tasks

How to: Delete a File in Visual Basic

How to: Delete a Directory in Visual Basic

Reference

My.Computer.FileSystem.DeleteDirectory Method

My.Computer.FileSystem.DeleteFile Method

Microsoft.VisualBasic.FileIO.RecycleOption