RMF
continuous-integration/drone/push Build is failing Details

This commit is contained in:
DESKTOP-DPA61F8\Benedek 2021-04-29 17:25:52 +02:00
parent c40e59ceb9
commit 94fcda4c2c
1 changed files with 6 additions and 0 deletions

View File

@ -56,6 +56,7 @@ def printCommand():
' Get current directory -> GWD \n' +
' Change current directory -> CWD <path> \n' +
' List content of current directory -> LST \n' +
' Remove file from current directory -> RMF <filename> \n' +
' Upload file to current directory -> UPL <filename> \n' +
' Download file from current directory -> DNL <filename> \n' +
' Login -> LIN <username> <password> \n' +
@ -161,6 +162,11 @@ while True:
print(network.recieveMessage().decode('UTF-8'))
continue
if separatedCommand[0] == 'RMF' and len(separatedCommand) == 2:
network.sendMessage(command.encode('UTF-8'))
print(network.recieveMessage().decode('UTF-8'))
continue
if separatedCommand[0] == 'UPL' and len(separatedCommand) == 2:
if os.path.isfile(separatedCommand[1]):
cmd = 'UPL ' + separatedCommand[1].split(os.path.sep)[-1]