Create a Blockly File.
user_id = data.get('userId', 'test')
xarm_version = data.get('version', GLOBAL.XArm.xarm_type)
root_path = os.path.join(projects_path, user_id, xarm_version, 'app', 'myapp')
file_name = data.get('folderName')
xml_data = data.get('xmlData')
folder_path = os.path.join(root_path, file_name)
code, _ = create_folder(root_path, folder_path)
code, _ = create_file(root_path, file_name, xml_data, xarm_version)
response(client, cmd_id, code, _)
self.appCreateFile = (obj, callback) => {
const params = window.GlobalConstant.INIT_CMD_PARAMS_COMMON_DATA();
Object.assign(params.data, obj);
self.sendCmd(window.GlobalConstant.APP_CREATE_FILE, params, (dict) => {
if (callback) {
callback(dict);
}
});
};