Desktop Functions: Smart Device Functions:
|
DeleteFile (kernel32)
C# Signature:
[DllImport("kernel32.dll"), SetLastError=true] User-Defined Types:None. Notes:None. Tips & Tricks:You can delete Alternate Data Streams (ADS). For example, to delete the ZoneId from a file: DeleteFile(filename + ":Zone.Identifier"); N.B. You can't delete ADS using the managed APIs. Sample Code:Always check the return value as false indicates failure. You can throw the appropriate .NET exception automatically by doing the following:
if(!DeleteFile(filename)) { Alternative Managed API:System.IO.File: public static void Delete(string path); Please edit this page!Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more). |
|