Sign Up

Files

List files

GET
/files

List entries under the requested directory. Omitting path uses the daemon work directory. depth defaults to 1 and recursive listings are capped at 10,000 entries.

Query Parameters

path?string

Target path. Omitted on GET /files to use the daemon work directory.

depth?string

Recursive listing depth for GET /files; omitted for the flat default (1).

Response Body

application/json
  1. response
[index: integer]?

One filesystem entry as /files and /files/info serialize it.

curl -X GET 'http://sandbox:2280/files'
[  {    "group": "string",    "isDir": true,    "modTime": "string",    "mode": "string",    "modifiedAt": "string",    "name": "string",    "owner": "string",    "path": "string",    "permissions": "string",    "size": 0  }]
DELETE
/files

Delete one file. Directories require recursive=true or recursive=1.

Query Parameters

path?string

Path to remove.

recursive?string

Recursive delete flag as the historical string query value.

Response Body

The path was deleted.

curl -X DELETE 'http://sandbox:2280/files'
Empty

Download many files

POST
/files/bulk-download

Stream a multipart response with file parts for successful paths and error parts carrying error envelopes for per-path failures. The outer response stays 200 on partial success.

Request Body

application/json
  1. body

JSON body for POST /files/bulk-download.

paths?array<string>

Paths to stream back as multipart file or error parts.

Response Body

Multipart file and error parts with the fixed boundary DAYTONA-FILE-BOUNDARY.

multipart/form-data
curl -X POST 'http://sandbox:2280/files/bulk-download' \  -H 'Content-Type: application/json' \  -d '{}'
Empty

Upload many files

POST
/files/bulk-upload

Stream multipart uploads correlated by files[i].path and files[i].file. Partial success is reported in the JSON body: each destination is created and opened under the same rules as /files/upload (paths normalized lexically, created files and directories handed to the sandbox default OS user, and — when one is configured — every write and every directory creation opened as that user could have; a per-entry refusal appears in errors and creates nothing). When atomic=true, each successful file is written through a temporary file + rename with no non-atomic fallback, and an unsupported atomic rename is reported in that entry's errors slot while the rest of the batch continues.

Query Parameters

atomic?boolean

Write each uploaded file via a temporary file + rename in its destination directory.

Request Body

Multipart form using files[i].path metadata parts and files[i].file content parts.

multipart/form-data
  1. body
files[0].path*string

Destination path for the file in the matching files[0].file part. Repeat with files[1].path, files[2].path, and so on for additional files.

files[0].file*file

File content for the path in files[0].path.

Formatbinary

Response Body

application/json
  1. response

Partial-success response from POST /files/bulk-upload.

errors*array<string>

Human-readable per-part failures.

files*array<>

Successfully written files.

curl -X POST 'http://sandbox:2280/files/bulk-upload' \  -F 'files[0].path=string' \  -F 'files[0].file=string'
{  "errors": [    "string"  ],  "files": [    {      "bytes": 0,      "path": "string"    }  ]}

Download one file

GET
/files/download

Stream one file as application/octet-stream. Directories are rejected.

Query Parameters

path?string

Target path. Omitted on GET /files to use the daemon work directory.

depth?string

Recursive listing depth for GET /files; omitted for the flat default (1).

Response Body

Raw file bytes.

application/octet-stream
curl -X GET 'http://sandbox:2280/files/download'
Empty

Find text in files

GET
/files/find

Walk the tree rooted at path and return literal substring matches with one-based line numbers.

Query Parameters

path?string

Root path to walk recursively.

pattern?string

Filename glob (search) or literal substring (find) pattern.

Response Body

application/json
  1. response
[index: integer]?

One literal line match from GET /files/find.

curl -X GET 'http://sandbox:2280/files/find'
[  {    "content": "string",    "file": "string",    "line": 0  }]

Create a folder

POST
/files/folder

Create the requested directory tree. Omitting mode uses the route default.

Query Parameters

path?string

Directory path to create.

mode?string

Optional octal mode string; omitted or empty uses the route default.

Response Body

The directory exists.

curl -X POST 'http://sandbox:2280/files/folder'
Empty

Get file metadata

GET
/files/info

Return one FileInfo record for the requested path.

Query Parameters

path?string

Target path. Omitted on GET /files to use the daemon work directory.

depth?string

Recursive listing depth for GET /files; omitted for the flat default (1).

Response Body

application/json
  1. response

One filesystem entry as /files and /files/info serialize it.

group*string

Numeric group id rendered as a string.

isDir*boolean

Whether the entry is a directory.

modTime*string

Deprecated but load-bearing: Go time.String() layout for the last modification time.

mode*string

Go os.FileMode.String() layout (-rw-r--r--, drwxr-xr-x, …).

modifiedAt*string

RFC 3339 UTC timestamp for the last modification time.

name*string

Base name of the entry.

owner*string

Numeric owner id rendered as a string.

path*string

Absolute path to the entry, rendered in the guest's path syntax.

permissions*string

Four-digit octal permissions (0644, 0755, …).

size*integer

Entry size in bytes.

Formatint64
Range0 <= value
curl -X GET 'http://sandbox:2280/files/info'
{  "group": "string",  "isDir": true,  "modTime": "string",  "mode": "string",  "modifiedAt": "string",  "name": "string",  "owner": "string",  "path": "string",  "permissions": "string",  "size": 0}

Move a file or directory

POST
/files/move

Rename the path when possible, or copy-then-remove across filesystems.

Query Parameters

source?string

Source path to move.

destination?string

Destination path.

Response Body

The path was moved.

curl -X POST 'http://sandbox:2280/files/move'
Empty

Change permissions

POST
/files/permissions

Change mode and, on platforms that support it, owner and group.

Query Parameters

path?string

Path whose permissions should change. On Linux, when this names a symlink, owner/group and mode follow it together so one request lands on the target inode.

mode?string

Optional octal mode string.

owner?string

Optional owner id or name, when the platform supports chown.

group?string

Optional group id or name, when the platform supports chgrp.

Response Body

Permissions were updated.

curl -X POST 'http://sandbox:2280/files/permissions'
Empty

Replace text in files

POST
/files/replace

Replace a literal substring across the requested files. File-specific failures stay inside the 200 response body.

Request Body

application/json
  1. body

JSON body for POST /files/replace.

files?array<string>

Files to rewrite.

newValue?|

Replacement text. Omitted only when the caller wants the route to reject the request.

pattern?string

Literal substring to replace.

Response Body

application/json
  1. response
[index: integer]?

One file's outcome from POST /files/replace.

curl -X POST 'http://sandbox:2280/files/replace' \  -H 'Content-Type: application/json' \  -d '{}'
[  {    "error": "string",    "file": "string",    "success": true  }]

Search filenames

GET
/files/search

Walk the tree rooted at path and return absolute file paths whose base name matches the glob pattern.

Query Parameters

path?string

Root path to walk recursively.

pattern?string

Filename glob (search) or literal substring (find) pattern.

Response Body

application/json
  1. response

Recursive filename-glob search results from GET /files/search.

files*array<string>

Absolute matching file paths.

curl -X GET 'http://sandbox:2280/files/search'
{  "files": [    "string"  ]}

Upload one file

POST
/files/upload

Stream the multipart part named file to the destination path from the query string. The path is normalized lexically (.. collapsed) before use. A newly created file — and every parent directory this call created — is owned by the sandbox default OS user when one is configured; a pre-existing file is rewritten in place and never re-owned. A symlink at the path is followed one hop, opened without following further links, and never re-owned. When atomic=true, the daemon writes a temporary file in the destination directory, fsyncs it, applies the destination mode, and renames it over the target with no non-atomic fallback. When a default OS user is configured every write — and every directory this call would create — is opened as that user could have: search permission on every directory, write permission on the destination (or on the deepest existing directory when parents are missing), symlinks anywhere on the path followed under the same rules; otherwise 403 FILE_ACCESS_DENIED and nothing is created.

Query Parameters

path?string

Destination path for the uploaded file.

atomic?boolean

Write via a temporary file + rename in the destination directory.

Request Body

Multipart form with one file part named file.

multipart/form-data
  1. body
file*file

File content.

Formatbinary

Response Body

The file was uploaded.

curl -X POST 'http://sandbox:2280/files/upload' \  -F 'file=string'
Empty

Watch a directory

GET
/files/watch

Server-sent events for one directory. The stream emits start with {}, fs with WatchFsEvent, and overflow with WatchOverflowEvent. follow=true is accepted and ignored for compatibility.

Query Parameters

path?string

Absolute directory path to watch.

recursive?boolean

Whether nested subdirectories should be watched too.

follow?boolean

Proxy streaming hint preserved for compatibility; the daemon accepts and ignores it.

Response Body

SSE stream of start, fs, and overflow events.

text/event-stream
curl -X GET 'http://sandbox:2280/files/watch'
Empty