feat(core): micropython 板卡文件管理 右键菜单添加 上传下载 选项

This commit is contained in:
王立帮
2025-08-21 21:40:18 +08:00
parent 4a45323c82
commit 30f3da24b1
11 changed files with 171 additions and 14 deletions

View File

@@ -72,12 +72,12 @@ class AmpyFS extends FS {
return [error, stdout];
}
async readFile(filePath) {
async readFile(filePath, encoding = 'utf8') {
let stdout = '', error = null, ampy = null;
try {
ampy = await this.getAmpy();
await ampy.enter();
stdout = await ampy.get(filePath);
stdout = await ampy.get(filePath, encoding);
} catch (e) {
error = e;
Debug.error(error);