Returns a File reference on a newly created file. By default, it creates a new file on disk. If the name corresponds to an already-existing file, it will be truncated and overwritten.
|filename ||the name of the file.|
|createFlag ||the flag describing the creation mode.|
|permissionFlag ||the flag describing the requested permissions. On platforms that do not manage permissions, this parameter will be ignored.|
- See also:
- OpeningFlag, PermissionFlag
File factory, to be used instead of a specific File subclass constructor, so that it can return a File instance that is actually a specialized one (ex: a StandardFile, not an abstract File).
|FileException,including ||FileCreationFailed if the operation failed or is not supported on this platform, or FileDelegatingException if the relevant filesystem manager could not be retrieved.|
File & myFile = File::Create( "myfilename" ) ;
myFile.write( "Hello Ceylan!" ) ;
delete & myFile ;
- Ceylan::Holder can be used as well to simplify the management of the lifecycle of File instances.