Skip to content

Commit 0a68b74

Browse files
committed
remove js implementation of ls tool
1 parent 7ee60a5 commit 0a68b74

1 file changed

Lines changed: 0 additions & 33 deletions

File tree

  • implement-shell-tools/ls

implement-shell-tools/ls/ls.py

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,3 @@
1-
# import process from "node:process";
2-
# import { promises as fs } from "node:fs";
3-
# import { program } from "commander";
4-
5-
# program
6-
# .name("list-files-in-directory")
7-
# .description("List all files and directories in a directory")
8-
# .argument("<path>", "The file path to process")
9-
# .option("-1, --one", "Output one entry per line")
10-
# .option("-a", "List all files & directories, including hidden ones");
11-
12-
# program.parse();
13-
14-
# const path = program.args[0];
15-
16-
# const options = program.opts();
17-
18-
# const directoryContent = await fs.readdir(path);
19-
20-
# let allContent = directoryContent;
21-
22-
# if (!options.a) {
23-
# allContent = directoryContent.filter(name => !name.startsWith("."));
24-
# }
25-
26-
# for (const item of allContent) {
27-
# if (options.one) {
28-
# process.stdout.write(item + "\n");
29-
# } else {
30-
# process.stdout.write(item + " ");
31-
# }
32-
# }
33-
341
import argparse
352
import os
363

0 commit comments

Comments
 (0)