feat(core): micropython 板卡文件管理 右键菜单添加 剪切复制粘贴 选项

This commit is contained in:
王立帮
2025-08-24 04:33:08 +08:00
parent 16a72f1773
commit 4f26f8e9f4
14 changed files with 299 additions and 35 deletions

View File

@@ -33,6 +33,8 @@ class AmpyExt extends Ampy {
rm: '{{&ampy}} -p {{&port}} -b {{&baud}} -i 0 rm "{{&filePath}}"',
rmdir: '{{&ampy}} -p {{&port}} -b {{&baud}} -i 0 rmdir "{{&folderPath}}"',
rename: '{{&ampy}} -p {{&port}} -b {{&baud}} -i 0 rename "{{&oldPath}}" "{{&newPath}}"',
cpdir: '{{&ampy}} -p {{&port}} -b {{&baud}} -i 0 cpdir "{{&startPath}}" "{{&endPath}}"',
cpfile: '{{&ampy}} -p {{&port}} -b {{&baud}} -i 0 cpfile "{{&startPath}}" "{{&endPath}}"',
run: '{{&ampy}} -p {{&port}} -b {{&baud}} -i 0 run "{{&filePath}}"'
}
@@ -90,6 +92,14 @@ class AmpyExt extends Ampy {
return this.exec(port, this.render('rename', { port, baud, oldPath, newPath }));
}
async cpdir(port, baud, startPath, endPath) {
return this.exec(port, this.render('cpdir', { port, baud, startPath, endPath }));
}
async cpfile(port, baud, startPath, endPath) {
return this.exec(port, this.render('cpfile', { port, baud, startPath, endPath }));
}
async run(port, baud, filePath) {
return this.exec(port, this.render('run', { port, baud, filePath }));
}