import os
import isystem.connect as ic
winidea_id = ''
def test_remove():
connMgr = ic.ConnectionMgr()
connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
rfCtrl = ic.CRemoteFileController(connMgr)
print(f"Writing local 'main.cpp' file to remote...")
wksFolderPath = ic.CIDEController(connMgr).getPath(ic.CIDEController.WORKSPACE_DIR)
localFilePath = os.path.join(wksFolderPath, "src", "main.cpp")
remoteFilePath = os.path.join(wksFolderPath, "remoteTestFile.txt")
rfCtrl.writeToRemote(localFilePath, remoteFilePath)
print(f"Removing remote file: {remoteFilePath}")
rfCtrl.remove(remoteFilePath)
if __name__ == "__main__":
test_remove()