RMF
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
DESKTOP-DPA61F8\Benedek 2021-04-29 17:25:52 +02:00
parent c40e59ceb9
commit 94fcda4c2c

View File

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