Commit a8b74a4
feat(python): support file delete + rename in the Pyodide VFS bridge (#138)
Wire os.remove/os.rmdir/os.rename/os.replace through to the kernel VFS:
- runner: implement the rename/unlink/rmdir node_ops (were ENOSYS stubs) + add
fsUnlink/fsRmdir/fsRename to both RPC bridges
- execution: add Unlink/Rmdir/Rename to PythonVfsRpcMethod (+ wire destination
field) and route them to the filesystem dispatcher
- filesystem: dispatch to kernel.remove_file/remove_dir/rename AND mirror into
the host-side shadow (remove/rename_guest_shadow_path) so a later shadow->kernel
sync can't resurrect a just-deleted entry
Test: python_runtime_supports_file_delete_and_rename verifies the ops in-isolate
and cross-checks the host kernel VFS.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 27b48c5 commit a8b74a4
9 files changed
Lines changed: 1545 additions & 61 deletions
File tree
- crates
- execution
- assets/runners
- src
- sidecar
- src
- tests
- packages/core/src
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
66 | 72 | | |
67 | 73 | | |
68 | 74 | | |
| |||
76 | 82 | | |
77 | 83 | | |
78 | 84 | | |
| 85 | + | |
| 86 | + | |
79 | 87 | | |
80 | 88 | | |
81 | 89 | | |
| |||
137 | 145 | | |
138 | 146 | | |
139 | 147 | | |
| 148 | + | |
| 149 | + | |
140 | 150 | | |
141 | 151 | | |
142 | 152 | | |
| |||
1176 | 1186 | | |
1177 | 1187 | | |
1178 | 1188 | | |
| 1189 | + | |
1179 | 1190 | | |
1180 | 1191 | | |
1181 | 1192 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
786 | 786 | | |
787 | 787 | | |
788 | 788 | | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
789 | 821 | | |
790 | 822 | | |
791 | 823 | | |
| |||
860 | 892 | | |
861 | 893 | | |
862 | 894 | | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
863 | 899 | | |
864 | | - | |
865 | | - | |
866 | | - | |
867 | | - | |
868 | | - | |
869 | | - | |
870 | | - | |
871 | | - | |
872 | | - | |
| 900 | + | |
| 901 | + | |
873 | 902 | | |
874 | 903 | | |
875 | 904 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| |||
222 | 223 | | |
223 | 224 | | |
224 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
225 | 230 | | |
226 | 231 | | |
227 | 232 | | |
| |||
231 | 236 | | |
232 | 237 | | |
233 | 238 | | |
234 | | - | |
235 | 239 | | |
236 | 240 | | |
237 | 241 | | |
| |||
2043 | 2047 | | |
2044 | 2048 | | |
2045 | 2049 | | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
2046 | 2053 | | |
2047 | 2054 | | |
2048 | 2055 | | |
| |||
0 commit comments