Programming Reference Manual
 
Syntax
 
object.FileMode
 
Description
How the file is to be created or opened.
 
Part
Description
object
Evaluates to a DartStream object.
 

Data Type

FileModeConstants (see below)

Remarks

Set this property prior to changing FileName to determine how the file is created.
See Also
 
FileModeConstants
 
Enumerates values of the FileMode property:
 
Value
Constant
Description
0
createAlways
If the file exists, replace the file.
If the file does not exist, create the file.
1
createExisting
If the file exists, open the file.
If the file does not exist, throw an error.
2
createUnique
If the file exists, create a file with a unique name (a period and a number are appended to the filename).
If the file does not exist, create the file.
3
createOpen
If the file exists, open the file.
If the file does not exist, create the file.