:::note Generated reference Generated from honeyframeapi 0.1.8 — do not edit by hand. :::
honeyframeapi.folder
Managed-folder handle — list / upload / download files.
f = project.create_folder("contracts")
f.upload("/local/scan.pdf") # → contracts/scan.pdf
files = f.list_files() # [{name, type, path, size, ...}]
f.download("scan.pdf", "/tmp/scan.pdf")
A thin wrapper over the platform's /api/storage/folders/* endpoints:
browse, upload, download, make directories and delete files in a managed
folder. Downloads are written owner-only (0600).
class Folder
Folder.get_info()
get_info() -> dict
Folder record (name, root_path, scope, …).
Folder.list_files()
list_files(path: str = '') -> list[dict]
List files + subdirectories at path (relative to the folder root).
Each item is {name, type: 'file'|'directory', path, size, ...}.
Folder.upload()
upload(local_path, dest: str = '') -> dict
Upload a local file into the folder (optionally under subdirectory
dest). Returns the server's {ok, file, message}.
Folder.upload_bytes()
upload_bytes(filename: str, content: bytes, dest: str = '') -> dict
Upload raw bytes as filename (no local file needed).
Folder.download()
download(name: str, to) -> str
Download file name (relative path within the folder) to local
path to. Returns the local path.
Folder.read_bytes()
read_bytes(name: str) -> bytes
Return the raw bytes of file name without writing to disk.
Folder.mkdir()
mkdir(path: str) -> dict
Create a subdirectory within the folder.
Folder.delete_file()
delete_file(path: str) -> dict
Delete a file (or empty subdirectory) within the folder.
Verified against honeyframeapi 0.1.8.