ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
Jam.Shell.Dialogs.FileOperation.TJamFileOperation.Delete

Deletes a file or folder.

Syntax
Pascal
class procedure Delete(const pFileName: IItemIdList; pOptions: TOperationOptions = soDefault); overload; static;
Parameters 
Description 
const pFileName: IItemIdList 
The file or folder that should be deleted.  
pOptions: TOperationOptions = soDefault 
Optional: The options to use.  
Exceptions 
Description 
if pFileName is invalid.  

The following example shows how to delete a file:

  var
    File: IItemIdList;
  begin
    File := TJamItemIdList.Create('C:file.exe');
    TJamFileOperation.Delete(File);
  end;