Commit 6da512e
committed
feat: add cp command for file copy operations
Add 'hypeman cp' command for copying files to/from running instances,
with docker cp compatible semantics:
Features:
- Copy files and directories to instances: hypeman cp file.txt instance:/path
- Copy from instances: hypeman cp instance:/path file.txt
- STDIN/STDOUT streaming with '-' argument for tar archives
- Recursive directory copying with proper tar packing/unpacking
- Symlink handling with --follow-links flag
- Archive mode (-a) to preserve UID/GID ownership
- Quiet mode (-q) to suppress progress output
- Docker cp path resolution semantics:
- SRC_PATH/. copies contents, not the directory itself
- Trailing slash handling for directory vs file detection
The command communicates with the API server via WebSocket,
streaming file data as binary chunks with JSON metadata headers.1 parent 1661f08 commit 6da512e
4 files changed
+992
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
110 | 108 | | |
111 | 109 | | |
112 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
0 commit comments