mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-11 15:24:05 +09:00
basic:catalog function (same as ls/dir)
This commit is contained in:
@@ -1465,6 +1465,17 @@ bF.load = function(args) { // LOAD function
|
|||||||
cmdbuf[lnum] = line.slice(i + 1, line.length);
|
cmdbuf[lnum] = line.slice(i + 1, line.length);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
bF.catalog = function(args) { // CATALOG function
|
||||||
|
if (args[1] === undefined) args[1] = "\\";
|
||||||
|
let pathOpened = fs.open(args[1], 'R');
|
||||||
|
if (!pathOpened) {
|
||||||
|
throw lang.noSuchFile;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let port = _BIOS.FIRST_BOOTABLE_PORT[0];
|
||||||
|
com.sendMessage(port, "LIST");
|
||||||
|
println(com.pullMessage(port));
|
||||||
|
};
|
||||||
Object.freeze(bF);
|
Object.freeze(bF);
|
||||||
while (!tbasexit) {
|
while (!tbasexit) {
|
||||||
let line = sys.read().trim();
|
let line = sys.read().trim();
|
||||||
|
|||||||
Reference in New Issue
Block a user