System.IOUtils.TFile.Create
Delphi
class function Create(const Path: string): TFileStream; overload; inline; static;
class function Create(const Path: string; const BufferSize: Integer): TFileStream; overload; static;
C++
static System::Classes::TFileStream* __fastcall Create(const System::UnicodeString Path)/* overload */;
static System::Classes::TFileStream* __fastcall Create(const System::UnicodeString Path, const int BufferSize)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.IOUtils.pas System.IOUtils.hpp |
System.IOUtils | TFile |
Description
Creates a new file and returns a stream associated with that file.
Use Create to create a new file and obtain a TFileStream instance. Create creates a new file at the given path and then creates a TFileStream instance associated with that file. The following table lists the parameters expected by this method.
Name | Meaning |
---|---|
Path |
The path to the file that will be created. |
BufferSize |
The size of the file operation buffer. |
Note: Create raises an exception if the file cannot be created or the path is invalid.