# create

> New file in a folder

*Changes something.*

New file in a folder.

Expects nothing: a name may repeat among siblings, so creating can never replace
anything and needs no revision. content carries the bytes as text and content_base64
carries bytes that are not text; exactly one of the two, and at most 1048576 bytes once
decoded. The result carries the new file's ID and revision, which is what a later change
to it expects. A refused change writes nothing at all. name_conflict does not exist: a
name is never a reason to refuse anything.

This change takes a key you choose, fresh for this change. If its result never reaches
you, call again with the same key and the same arguments, or ask the status tool with
that key: the same key and the same input is one change, made once.

## Arguments

| Argument | Type | Required | Meaning |
| --- | --- | --- | --- |
| `folder_id` | text | yes | The folder to create it in |
| `name` | text | yes | What to call it |
| `content` | bytes | no | The bytes, as text; exactly one of content and content_base64 |
| `content_base64` | bytes | no | The bytes, base64-encoded, for content that is not text |
| `key` | text | yes | A key you choose for this change, fresh each time; repeat it to settle a lost result |

## On the command line

```sh
flie agent create FOLDER_ID NAME --from PATH [--key OPERATION_KEY]
```

```sh
flie --json agent create FOLDER_ID note.md --from ./note.md      # --from - reads stdin
```
