# file

> The file identity: a file read or write on the operator's host. Every field and what is required.

`file` reads or writes a file on the operator's host. It is the object sandboxed scanners cannot reach. The target is ignored.

## Write it in English

A file step reads as `read "<path>"` or `write "<path>" with "<data>"`:

```text
file write-it
  write "C:\\Temp\\exploit.mvg" with "push graphic-context\nfill 'url(x|id)'\npop graphic-context\n"
```

## The directives

### read and write

One of the two verbs is required. `read "<path>"` reads the file; `write "<path>" with "<data>"` writes the data.

The data is the bytes to write, required on a write step. The path is required on both.

## Example

```text
file read-flag
  read "{flag_path}"
  expect a flag
```