Skip to main content
The File System API provides endpoints for managing files and directories, including reading, writing, searching, uploading, downloading, and manipulating file permissions.

File Operations

List Files

List files and directories in a specified path.
Query Parameters: Response:

Get File Info

Get detailed information about a file or directory.
Response:

Download File

Download a single file.
Response: Binary file content with Content-Type: application/octet-stream

Download Multiple Files

Download multiple files in a single request.
Request Body:
Response: Multipart form data containing all requested files

Upload File

Upload a single file to a specified path.
Form Data:
  • file: The file to upload

Upload Multiple Files

Upload multiple files in a single request.

Directory Operations

Create Folder

Create a new directory with specified permissions.
Query Parameters:

Delete File or Directory

Delete a file or directory.
Query Parameters:

Move or Rename

Move or rename a file or directory.
Query Parameters:

Search Operations

Search Files by Pattern

Search for files matching a specific pattern.
Query Parameters: Response:

Find Text in Files

Search for text content within files.
Query Parameters: Response:

Replace Text in Files

Replace text pattern with new value in multiple files.
Request Body:
Response:

Permissions

Set File Permissions

Set permissions, ownership, and group for a file or directory.
Query Parameters:

File Information Schema

The FileInfo object contains:

Best Practices

Use bulk operations when working with multiple files to reduce network overhead and improve performance.
  • Always specify absolute paths to avoid ambiguity
  • Use recursive deletion with caution
  • Set appropriate file permissions for security
  • Handle file not found errors gracefully
  • Use search operations for large directory trees instead of listing all files

Example Usage

Prefer using the official Daytona SDKs over direct API calls for better type safety and error handling.