Class FileOperationAPIWrapper
- Namespace
- SunamoPInvoke.PInvoke
- Assembly
- SunamoPInvoke.dll
Provides wrapper methods for Windows shell file operations such as sending files to the recycle bin.
public class FileOperationAPIWrapper
- Inheritance
-
FileOperationAPIWrapper
- Inherited Members
- Extension Methods
Methods
DeleteCompletelySilent(string)
Permanently deletes a file or directory silently without sending to the recycle bin.
public static bool DeleteCompletelySilent(string path)
Parameters
pathstringLocation of directory or file to delete.
Returns
- bool
True if the operation succeeded, false otherwise.
MoveToRecycleBin(string)
Sends a file silently to the recycle bin. Suppresses dialog, suppresses errors, deletes if too large.
public static bool MoveToRecycleBin(string path)
Parameters
pathstringLocation of directory or file to recycle.
Returns
- bool
True if the operation succeeded, false otherwise.
Send(string)
Sends a file to the recycle bin. Displays dialog and warning if files are too big to fit (FOF_WANTNUKEWARNING).
public static bool Send(string path)
Parameters
pathstringLocation of directory or file to recycle.
Returns
- bool
True if the operation succeeded, false otherwise.
Send(string, FileOperationFlags)
Sends a file or directory to the recycle bin with specified flags.
public static bool Send(string path, FileOperationAPIWrapper.FileOperationFlags flags)
Parameters
pathstringLocation of directory or file to recycle.
flagsFileOperationAPIWrapper.FileOperationFlagsFileOperationFlags to add in addition to FOF_ALLOWUNDO.
Returns
- bool
True if the operation succeeded, false otherwise.