Syntax
| object.FileName
| ||||
---|---|---|---|---|---|
Description
| Intended name of the file.
Data TypeString
RemarksWhen set to a file name, the file is opened. When set to an empty string, the file is closed.
When set to an empty string and then changed to a file name, a file is created or opened according to FileMode. If an existing file is opened, the value of the Size property determines how the file is treated:
If Size = 0 when the file is opened, it is assumed the file is being opened for reading, and Size is set to the size of the file.
If Size > 0 when the file is opened, it is assumed the file is being opened for writing, and the existing contents of the file are replaced.
When set to a file name and then changed to an empty string, all data in the file is buffered to memory and the file is closed.
When set to a file name and then changed to a different file name, the file is moved to the new location. If FileMode = createUnique, an existing file cannot be unintentionally overwritten.
You can delete a file only by setting this property to an existing file name, setting FileMode to createOpen or createExisting, setting DeleteOnDestroy to True, and allowing the DartStream Object to be destroyed.
| ||||
See Also
|