mirror of
https://github.com/m-lamonaca/dev-notes.git
synced 2025-05-14 15:16:27 +00:00
Fix typos
This commit is contained in:
parent
76550dfa3c
commit
5c0799df7f
118 changed files with 1150 additions and 1602 deletions
|
@ -1,6 +1,6 @@
|
|||
# fs (FIle System) Module
|
||||
|
||||
Async versions can acces file at the same time which can lead to conflicts in operations, erros can be handled in callback.
|
||||
Async versions can access file at the same time which can lead to conflicts in operations, errors can be handled in callback.
|
||||
Sync versions cannot interfere with each other, errors cause exceptions, handle in try-catch.
|
||||
|
||||
## Files
|
||||
|
@ -71,7 +71,7 @@ fs.rmdirSync(path, recursive=false;
|
|||
### Reading Directory Contents
|
||||
|
||||
```js
|
||||
// read directrory contents
|
||||
// read directory contents
|
||||
fs.readdir(path, (err, files) => {}); // files is string[]
|
||||
fs.readdir(path, { withFileTypes: true }, (err, files) => {}); // files is Dirent[]
|
||||
fs.readdirSync(path); // returns string[] of files/directories
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue