feat(core): micropython 板卡文件管理 右键菜单添加 剪切 、复制 和 粘贴 选项
This commit is contained in:
12
common/templates/python/cpfile.py
Normal file
12
common/templates/python/cpfile.py
Normal file
@@ -0,0 +1,12 @@
|
||||
try:
|
||||
import os
|
||||
except ImportError:
|
||||
import uos as os
|
||||
|
||||
def cpfile(src, dst):
|
||||
with open(src, 'rb') as src_file:
|
||||
content = src_file.read()
|
||||
with open(dst, 'wb') as dst_file:
|
||||
dst_file.write(content)
|
||||
|
||||
cpfile('{{&oldPath}}', '{{&newPath}}')
|
||||
Reference in New Issue
Block a user