Skip to main content
Work with files in HopX sandboxes using comprehensive file operations. This hub covers all filesystem operations, from basic read/write to advanced file watching and bulk transfers.

What You’ll Learn

  • How to read and write files in sandboxes
  • How to list directories and navigate the filesystem
  • How to upload and download files to/from sandboxes
  • How to watch files for changes
  • How to manage file permissions and metadata

File Operations Overview

OperationSDK MethodAPI Endpoint
Readingsandbox.files.read()GET /files/read
Writingsandbox.files.write()POST /files/write
Listingsandbox.files.list()GET /files/list
Uploadingsandbox.files.upload()POST /files/upload
Downloadingsandbox.files.download()GET /files/download
Watchingsandbox.files.watch()WebSocket /files/watch

Core Concepts

Reading Files

Read file contents from sandboxes as text or binary data.

Writing Files

Write text or binary data to files in sandboxes.

Listing Files

List directory contents and navigate the filesystem.

Uploading Files

Upload files from your local machine to sandboxes.

Downloading Files

Download files from sandboxes to your local machine.

Watching Files

Watch files and directories for changes in real-time.

SDK Reference

Python SDK

Complete reference for Python file operations.
  • Files Module - Complete filesystem API
    • files.read() - Read files
    • files.write() - Write files
    • files.list() - List directories
    • files.upload() - Upload files
    • files.download() - Download files
    • files.watch() - Watch files
    • files.exists() - Check existence
    • files.remove() - Delete files
    • files.mkdir() - Create directories

JavaScript SDK

Complete reference for JavaScript/TypeScript file operations.
  • Files Module - Complete filesystem API
    • files.read() - Read files
    • files.write() - Write files
    • files.list() - List directories
    • files.upload() - Upload files
    • files.download() - Download files
    • files.watch() - Watch files
    • files.exists() - Check existence
    • files.remove() - Delete files
    • files.mkdir() - Create directories

API Reference

VM Agent API

REST API endpoints for file operations.

Quick Start

If you’re new to file operations, start here:
  1. Reading Files - Read your first file
  2. Writing Files - Write files to sandboxes
  3. Listing Files - Navigate directories

Next Steps