API
Upload files
Push local files into the box. Each entry maps a local path to a destination inside the box workspace.Write files
Create or overwrite a file directly from a string. Useful when you want to inject configuration, scripts, or generated content without a local file.Read files
Read the contents of a file as a string.Read part of a file
Passlength to read a bounded byte range instead of the whole file, starting at offset (default 0). This keeps a large log or dataset out of memory when you only need a slice of it. The server rejects a length above 8 MiB.
Inspect a path
Get metadata for a single path without reading it: the entry type, size, last modified time, inode, and an opaqueversion token.
Use version for optimistic concurrency. Read it before a slow operation, then compare it afterwards to detect whether the file changed underneath you. Compare it for equality only, and do not parse it.
"symlink". Pass follow to resolve it and describe the target instead.
Create directories
Create a directory. Passparents to create missing parent directories, the way mkdir -p does, and to succeed when the directory already exists.
Move and rename
Move a path to a new location, which is also how you rename it.Delete files
Remove a file. Removing a directory requiresrecursive, so a directory is never deleted by accident.
List files
List the entries in a directory. Each entry includes the path, size, type, and last modified timestamp.Download files
Pull files from the box back to your local machine. Call with no arguments to download the entire workspace, or pass afolder to download a specific file or directory.