executor almost finito
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
663b5f6d37
commit
b8828d52b4
@ -50,15 +50,20 @@ class Executor:
|
|||||||
return strdirectory
|
return strdirectory
|
||||||
|
|
||||||
def putFileInCurrentDirectory(self, filename: str, content) -> str:
|
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):
|
def getFileInCurrentDirectory(self, file: str):
|
||||||
file = self.sanitizeFile(file)
|
file = self.sanitizeFile(file)
|
||||||
currentfile = self.currentDirectory + file
|
currentfile = self.currentDirectory + "/" + file
|
||||||
return open(currentfile, "r")
|
return open(currentfile, "r")
|
||||||
|
|
||||||
def removeFileInCurrentDirectory(self, file: str) -> str:
|
def removeFileInCurrentDirectory(self, file: str) -> str:
|
||||||
file = self.sanitizeFile(file)
|
file = self.sanitizeFile(file)
|
||||||
currentfile = self.currentDirectory + file
|
currentfile = self.currentDirectory + "/" + file
|
||||||
os.remove(currentfile)
|
os.remove(currentfile)
|
||||||
return currentfile
|
return currentfile
|
||||||
|
Loading…
Reference in New Issue
Block a user