Creates and opens an ASCII or binary file. If the file exists, it will be truncated and then opened.
[Ok := ] File.CREATE(Name)
Specifies the file.
Type: text or code
The name of the file, including the path. The following rules apply:
You can omit the drive designation if the file is located on the current drive.
You can omit the full path if the file is located in the current directory.
You can enter only the subdirectory name if the file is located in a subdirectory of the current directory.
Property Value/Return Value
Specifies whether the file was created.
true if the file was created; otherwise, false.
Always call thebefore you use the CREATE function or the .
If TEXTMODE is true and you read or write to the file, text is placed in the buffer.
If TEXTMODE is false, binary information is placed in the buffer.
Differences Between the Classic Client and RoleTailored Client
If you are running the RoleTailored client and you call CREATE on a file variable that refers to an open file, the function will not automatically close the existing file and create the new file. You must explicitly call theto close the existing file. Otherwise, a run-time error occurs.
If you are running the Classic client and you call CREATE on a file variable that refers to an open file, the function will CLOSE the existing file and CREATE the new file. A run-time error does not occur.