ShellBrowser Delphi Components Documentation
|
Creates a new file.
class procedure NewFile(const pFolder: IItemIdList; const pNewName: string; pOptions: TOperationOptions = soDefault); overload; static;
Parameters |
Description |
const pFolder: IItemIdList |
The existing folder where the new file should be created. |
const pNewName: string |
The relative name of the new file. |
pOptions: TOperationOptions = soDefault |
Optional: The options to use. |
Exceptions |
Description |
EArgumentException |
if pFileName is empty or not absolute. |
if parent folder of pFileName is invalid or if any COM exception occured. |
The following example shows how to create a new file:
var NewFile: IItemIdList; begin NewFile := TJamItemIdList.Create('C:newfile.txt'); TJamFileOperation.NewFile(NewFile); end;