executor almost finito
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2021-04-18 15:34:00 +02:00
parent 663b5f6d37
commit b8828d52b4
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047

View File

@ -50,15 +50,20 @@ class Executor:
return strdirectory
def putFileInCurrentDirectory(self, filename: str, content) -> str:
pass
filename = self.sanitizeFile(filename)
currenctfile = self.currentDirectory + "/" + filename
f = open(currenctfile,"wb")
f.write(content)
f.close()
return currenctfile
def getFileInCurrentDirectory(self, file: str):
file = self.sanitizeFile(file)
currentfile = self.currentDirectory + file
currentfile = self.currentDirectory + "/" + file
return open(currentfile, "r")
def removeFileInCurrentDirectory(self, file: str) -> str:
file = self.sanitizeFile(file)
currentfile = self.currentDirectory + file
currentfile = self.currentDirectory + "/" + file
os.remove(currentfile)
return currentfile