Copy Files
During development, it is often necessary to copy input files from a local machine to a Crafting workspace, or to retrieve result files from a workspace back to a local machine. Several options are available for this.
Using scp
The cs scp command is a simple wrapper around the standard scp command:
cs scp <LOCAL-FILE> <SANDBOX/WORKSPACE>:<REMOTE-PATH> # copy a file from local to workspace
cs scp <SANDBOX/WORKSPACE>:<REMOTE-FILE> <LOCAL-PATH> # copy a file from workspace to local
To pass flags directly to scp, place them after cs scp -- .
Using rsync
The cs rsync command uses rsync to perform a one-time synchronization of files between a local machine and a workspace:
cs rsync <LOCAL-PATH> <SANDBOX/WORKSPACE>:<REMOTE-PATH>
To pass flags directly to rsync, use cs rsync -- flags <LOCAL-PATH> <SANDBOX/WORKSPACE>:<REMOTE-PATH>.
Using mutagen
The cs mutagen command wraps mutagen for continuous file synchronization between a local machine and a workspace:
cs mutagen <LOCAL-PATH> <SANDBOX/WORKSPACE>:<REMOTE-PATH>
Note that mutagen continuously generates traffic over SSH, which may prevent the sandbox from being automatically suspended due to inactivity.
Drag and Drop in Web IDE or VS Code
Files can be copied directly by dragging and dropping them onto the File Explorer view in the Web IDE or VS Code.