File.prototype.new()

Create a new file.

Syntax

file.new() file.new(placement uint32, name string, placeholder uint8) File

Parameters

placement uint32

Where to place the new file relative the the referenced one, one of [os.BEFORE, os.AFTER, os.PREPEND, os.APPEND].

There are modifiers which affect how conflicts are resolved, one of [os.RENAME, os.FORCE].

See file placement for more details.

When omitted, defaults to (os.APPEND | os.RENAME).

name string

File’s name. It is invalid to use special characters like spaces. When omitted, defaults to "new".

placeholder uint8

Which placeholder to place the file in.

When omitted, defautls to 0.

Description

Create a new file relative to the referenced one. The file does not need to be explicitely stored, every file operation is automatically commited to disk once the transaction successfully exits.

Examples

Minimal example, no arguments provided.

Equivalent method call with all arguments provided.

Placement os.PREPEND.

Placement os.APPEND.

Placement os.BEFORE.

Placement os.AFTER.

Leaving off placeholder is invalid.

It is invalid to use spaces or special chars in the.