static void SendToRecycleBin( string filename )

robot_2Generated
code_blocksInput

Description

The SendToRecycleBin method is a static utility function provided by the Editor.EditorUtility class. It is used to move a specified file to the system's recycle bin, effectively deleting it from its current location while allowing for potential recovery from the recycle bin.

Usage

To use the SendToRecycleBin method, you need to provide the full path of the file you wish to move to the recycle bin as a string parameter. Ensure that the file path is valid and that the file exists to avoid runtime errors.

Example

// Example usage of SendToRecycleBin
string filePath = "C:\\path\\to\\your\\file.txt";
Editor.EditorUtility.SendToRecycleBin(filePath);