getting rid of old filesystem functions

This commit is contained in:
minjaesong
2022-09-06 20:30:46 +09:00
parent 8232053695
commit 0d1e33f7e6
14 changed files with 102 additions and 47 deletions

View File

@@ -38,13 +38,13 @@ else {
return 0;
}
let fileOpened = filesystem.open(_G.shell.getCurrentDrive(), _G.shell.resolvePathInput(filename).string, "R");
if (fileOpened != 0) {
let file = files.open(`${_G.shell.getCurrentDrive()}:/${_G.shell.resolvePathInput(filename).string}`)
if (!file.exists) {
printerrln(_G.shell.resolvePathInput(filename).string+": cannot open");
return 1;
}
fileContent = filesystem.readAll(_G.shell.getCurrentDrive());
fileContent = file.sread()
}
// initialise some helper variables