mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-16 17:34:05 +09:00
more chdir wip
This commit is contained in:
@@ -69,6 +69,16 @@ filesystem.readAll = function(driveLetter) {
|
||||
}
|
||||
return com.pullMessage(port[0]);
|
||||
};
|
||||
filesystem.isDirectory = function(driveLetter) {
|
||||
let port = filesystem._toPorts(driveLetter);
|
||||
com.sendMessage(port[0], "LISTFILES");
|
||||
let response = com.getStatusCode(port[0]);
|
||||
|
||||
if (135 == response) {
|
||||
throw Error("File not opened");
|
||||
}
|
||||
return (response === 0);
|
||||
}
|
||||
Object.freeze(filesystem);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user