Skip to content

Commit

Permalink
Docs: Update os-module.md (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
luckrnx09 authored Dec 29, 2023
1 parent fe73acd commit f315038
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/os-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function listItems(directory) {
items.forEach((item) => {
const itemPath = path.join(directory, item);
const stats = fs.statSync(itemPath);
console.log(`${item}${stats.isDirectory() ? '目录' : '文件'}`);
console.log(`${item}${stats.isDirectory() ? 'directory' : 'file'}`);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import path from 'path';

function listItems(directory) {
const items = fs.readdirSync(directory);

items.forEach((item) => {
items.forEach((item) => {
const itemPath = path.join(directory, item);
const stats = fs.statSync(itemPath);
console.log(`${item}${stats.isDirectory() ? '目录' : '文件'}`);
Expand Down

0 comments on commit f315038

Please sign in to comment.