# File management

The **Files** page is your workspace (the sandbox). Files the AI edits live here too.

## Importing

The top toolbar can:

- **Import project**: bring a project directory in from your computer
- **New file / New folder**

Or just ask the AI to do it:

> "Create a mygame/ directory in the workspace with a main.c inside it"

## Opening

**Tap a file name** → a menu appears:

| Menu item | What it does |
|---|---|
| Open | Go into the Editor (**read-only** by default, to prevent accidental edits) |
| Compile | Compile to the next artifact level (see below) |
| Run | Compile and run |
| Open with external app | Hand it to the system (view an image, read a PDF, play audio...) |
| Rename / Delete | Exactly what they say |

## Views: four ways to look at a directory

Tapping that toolbar icon **cycles** through them (the icon itself shows the **current** one):

| Icon | View | Looks like |
|---|---|---|
| Grid of squares | **Large icons** | One thumbnail per cell — good for images and browsing |
| Small squares | **Small icons** | Four cells per row, dense |
| Dot + lines | **List** | One row per entry: name, size, time |
| **Tree** | **Tree view** | **Directories expand in place** (below) |

### Tree view

The vertical line on the left is the hierarchy; **indentation** means "under whom". A directory row has
an arrow on its left:

- Tap the **arrow** ⇒ expand / collapse that level (**without** entering it);
- Tap **anywhere else on the row** ⇒ enter it if it is a directory, open it if it is a file
  (same as the other three views).

⚠ Expansion is **remembered**: leave a directory and come back, and what you expanded is still open.
Only the levels you actually tapped are expanded — the whole workspace is never laid out at once
(that would stall on tens of thousands of files).

## The file name colors mean something

| Color | Meaning |
|---|---|
| **Green** | Source that VML can compile (27 languages) |
| **Orange** | `.vml` (text assembly) |
| **Red** | `.vmb` (binary bytecode) |
| No color | Everything else (README, images...) |

The colors only mark **"this one can be compiled / run"** — not "source ought to be green".
A screen full of color makes it harder to see what matters.

## What "Compile" produces

It is decided by the current file; you do not choose:

```
main.c   --->  main.vml       (source -> text assembly)
main.vml --->  main.vmb       (text assembly -> binary bytecode)
main.vmb --->  (already final; it can only be run)
```

If an artifact **with the same name already exists**, you are asked to **Overwrite / Rename / Cancel** —
the artifact may be a file you edited by hand, and silently overwriting it cannot be undone.
