21 lines
515 B
JavaScript
21 lines
515 B
JavaScript
|
"use strict";
|
||
|
exports.__esModule = true;
|
||
|
exports.ls = void 0;
|
||
|
function ls(curdir) {
|
||
|
var buf = "";
|
||
|
buf += "Files in the current directory:\n";
|
||
|
for (var key in curdir) {
|
||
|
if (typeof curdir[key] == "string") {
|
||
|
buf += key + " (file)\n";
|
||
|
}
|
||
|
else if (typeof curdir[key] == "object") {
|
||
|
buf += key + " (directory)\n";
|
||
|
}
|
||
|
else {
|
||
|
buf += key + " (unknown)\n";
|
||
|
}
|
||
|
}
|
||
|
return buf;
|
||
|
}
|
||
|
exports.ls = ls;
|
||
|
//# sourceMappingURL=ls.js.map
|