Create file
Create an empty file (or one holding some text), choosing what happens when a file of that name is already there.
Command in the File toolkit · id ooa.file/create · 4 inputs (1 required), 2 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| File | File | Yes | File to create; its folder is created when missing. | |
| If exists | String | No | fail | When the file is already there: stop with FILE.EXISTS, replace it, create a numbered name such as notes (2).txt, or leave it as it is. |
| Text | String | No | Text to put in the new file; empty for an empty file. | |
| Encoding | String | No | utf-8 | Text encoding, e.g. utf-8, utf-16le, windows-1252. |
Outputs
| Output | Type | What it is |
|---|---|---|
| path | File | Full path of the file (the numbered name with keep both). |
| created | Boolean | True when a file was written; false when an existing file was kept. |