System.IOUtils.TFile.CreateText

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

class function CreateText(const Path: string): TStreamWriter; static;

C++

static System::Classes::TStreamWriter* __fastcall CreateText(const System::UnicodeString Path);

Properties

Type Visibility Source Unit Parent
function public
System.IOUtils.pas
System.IOUtils.hpp
System.IOUtils TFile

Description

Creates a new textual file and returns a text writer associated with that file.

Use CreateText to create a new textual file and obtain a TStreamWriter instance. CreateText creates a new empty textual file at the given path and then creates a TStreamWriter 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.



Note: CreateText raises an exception if the file cannot be created or the path is invalid.

See Also