···202202203203If VS Code is already exposed the existing URL is returned immediately.
204204205205+#### Copy
206206+207207+Transfer files and directories between your local machine and a sandbox, or
208208+directly between two sandboxes.
209209+210210+```elixir
211211+# Upload a local directory to the sandbox
212212+:ok = sandbox |> Sandbox.upload("./my-project", "/workspace")
213213+214214+# Upload a single file
215215+:ok = sandbox |> Sandbox.upload("./config.json", "/workspace")
216216+217217+# Download a path from the sandbox to a local directory
218218+:ok = sandbox |> Sandbox.download("/workspace/output", "./output")
219219+220220+# Copy a path from one sandbox to another (no local I/O)
221221+:ok = sandbox |> Sandbox.copy_to(other_sandbox.id, "/workspace", "/workspace")
222222+```
223223+224224+`upload/4` respects `.pocketenvignore`, `.gitignore`, `.npmignore`, and
225225+`.dockerignore` files found anywhere under the source directory, so files
226226+like `node_modules/` and build artefacts are excluded automatically.
227227+228228+| Function | Returns | Description |
229229+|---|---|---|
230230+| `Sandbox.upload(sandbox, local_path, sandbox_path, opts)` | `:ok` | Compress and upload a local file or directory to the sandbox |
231231+| `Sandbox.download(sandbox, sandbox_path, local_path, opts)` | `:ok` | Download a path from the sandbox and extract it locally |
232232+| `Sandbox.copy_to(sandbox, dest_id, src_path, dest_path, opts)` | `:ok` | Copy a path from this sandbox to another sandbox |
233233+234234+The storage endpoint defaults to `https://sandbox.pocketenv.io` and can be
235235+overridden via the `:storage_url` app config key or the
236236+`POCKETENV_STORAGE_URL` environment variable.
237237+205238---
206239207240## Types