anote
1import { Keywords } from "../flows/Keywords";
2import { Command } from "./Command";
3
4export class Ls extends Command {
5async execute(): Promise<string> {
6if(!this.isValid(Keywords.LIST)) return 'Not valid command.';
7const tail: string = this.getTail();
8
9// if(tail === '/') {
10// const list: string[] = await this.storage.listAll();
11// return list.join('\r\n');
12// }
13
14const list: string[] = await this.storage.list(tail);
15if(list.length === 0){
16return 'No such paths';
17}
18return list.join('\r\n');
19}
20}