Repository navigation
BridgeFS
PB-Kronos edited this page Jun 11, 2026
·
2 revisions
bridgefs is the host-side filesystem layer used by the Python bridge.
It is an addon to sys, not a standalone user feature.
- reads and writes files on the host machine
- lists directories
- creates directories
- copies, moves, replaces, and deletes files
- downloads files from the repository or from URLs
The bridge supports host paths:
-
/somethingresolves under the CraftOS-PC root -
C:/...orD:/...writes directly to that drive - relative paths are rooted to the CraftOS-PC directory
The host helper folder is controlled by python_path.
- blank
python_pathuses%APPDATA%\CraftOS-PC\pythonon emulator releases - a full Windows path can be set manually
Example:
set python_path "C:\Users\craftos\python"
Downloads accept either:
- a full URL
- a repository-relative path
Examples:
sys.fs.download("pkg/bridgefs/file.lua", "/bin/file.lua")
sys.fs.download("https://example.com/file.txt", "C:/Temp/file.txt")The file command is the Lua-side debug wrapper for bridgefs:
file read <path>
file write <path> <data>
file exists <path>
file list [path]
file readlines <path>
file mkdir <path>
file copy <src> <dst>
file move <src> <dst>
file replace <src> <dst>
file delete <path>
file run <path>
file download <src> <dst>