Skip to content

13.ide_rename_file

Rename file name in ide project interface:
Renames a file name in an ide project.

Message:

json
{
    "cmd": "ide_rename_file",
    "data": {
        "version":"lite6",
        "user_Id":"test",
        "projectName":"BlocklyToPython",
        "oldPath":"/32321.py",
        "newName":"3232.py"
    },
    "id": "1"
}

\

Request:

datatypeRequired fieldsDescription
versionstringyesLite6 arm passes “lite6”, other types pass null
user_IdstringyesDefault pass test
projectNamestringyesThe parent directory of the project
oldPathstringyesrelative path to the current file in pythonIDE
newNamestringyesModified project file name

\

Respons:

code=0->Success;
code!=0->-34 indicates a file renaming exception, -11 indicates that the file with the new name already exists, and -12 indicates that the current file does not exist.

\