createNew Constant

Top  Previous  Next

Specifies that a file or folder should not be opened if it already exists.

Syntax

File.createNew

Remarks

This constant is used only with open function. It specifies that a file or folder should be created only if it does not exist. If the file exists, the operation fails.

Examples

f = File.open("test", File.createNew | File.openFile);

See Also

open Function