Login Register
Advanced Control and File Management

Filesystem Commands for File and Folder Operations

Estimated reading: 0 minutes 9 views

GameCatalyst provides 17 filesystem commands for managing files and folders. These give Vex the ability to create scripts, edit code, organize folders, and manage assets — all with safety built in.

File operations (9):

  • file.info — File metadata (size, modified date)
  • file.read — Read contents
  • file.create — Create new file (alias: touch)
  • file.edit — Edit with append/prepend/replace modes
  • file.delete — Delete (alias: file.rm)
  • file.copy — Copy to destination
  • file.duplicate — Copy in same directory
  • file.move — Move to new location
  • file.rename — Rename in place

Folder operations (8):

  • folder.info, folder.read (aliases: ls, dir), folder.create (alias: mkdir), folder.rename, folder.delete (alias: rmdir), folder.copy, folder.duplicate, folder.move

Critical safety feature: All write operations default to dry-run mode. The command simulates and shows what would happen. Set dry_run: false explicitly to execute for real. This prevents accidental changes and gives you a preview every time.

Common aliases:

Several filesystem commands have familiar aliases. folder.read can be called as ls or dir. folder.create responds to mkdir. file.create responds to touch. file.delete responds to file.rm. folder.delete responds to rmdir. These aliases make commands feel natural if you are familiar with terminal commands.

File edit modes:

The file.edit command supports multiple modes: append (add content to the end), prepend (add content to the beginning), and replace (find and replace specific text). This makes it possible to surgically modify existing files without rewriting them completely.

Safety everywhere:

Every write operation checks project containment (inside project root only), protected paths (.git, Library, Temp, Logs are blocked), whitelist compliance, max depth (10 levels default), max file size (1 MB default), and dry-run mode. Multiple layers of safety work together so no single misconfiguration can cause damage to your project files.

Project containment:

All filesystem operations are restricted to your Unity project root directory. The AI cannot access files on your desktop, in other projects, or in system directories. Even if a relative path tries to escape the project root (like ../../etc/passwd), GameCatalyst resolves it and blocks the operation. This containment plus dry-run plus protected paths creates a comprehensive safety net that protects your entire file system from accidental AI modifications.

Share this Doc

Filesystem Commands for File and Folder Operations

Or copy link

CONTENTS
Antimanual

Ask our AI support assistant your questions about our platform, features, and services.

You are offline
Chatbot Avatar
What can I help you with?