-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from GuoXiCheng/dev-c
update file-system
- Loading branch information
Showing
5 changed files
with
73 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# 目录操作 | ||
|
||
## 创建目录 | ||
|
||
<<< @/../projects/javascript-sandbox/src/file-system/directory-mkdir.ts#mkdir | ||
|
||
## 读取目录 | ||
|
||
<<< @/../projects/javascript-sandbox/src/file-system/directory-readdir.ts#readdir | ||
|
||
## 删除目录 | ||
|
||
<<< @/../projects/javascript-sandbox/src/file-system/directory-rmdir.ts#rmdir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# 文件状态 | ||
|
||
## 获取文件状态 | ||
|
||
<<< @/../projects/javascript-sandbox/src/file-system/stat.ts#stat | ||
|
||
## 文件状态对象 | ||
|
||
| 属性/方法 | 返回值类型 | 描述 | | ||
| --------------- | ---------- | --------------------- | | ||
| `size` | number | 获取文件大小(bytes) | | ||
| `mode` | number | 获取文件权限 | | ||
| `atime` | Date | 获取文件访问时间 | | ||
| `mtime` | Date | 获取文件修改时间 | | ||
| `ctime` | Date | 获取文件状态改变时间 | | ||
| `birthtime` | Date | 获取文件创建时间 | | ||
| `isFile()` | boolean | 判断是否为文件 | | ||
| `isDirectory()` | boolean | 判断是否为目录 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# 流操作 | ||
|
||
## 读取流 | ||
|
||
<<< @/../projects/javascript-sandbox/src/file-system/stream-read.ts | ||
|
||
## 写入流 | ||
|
||
<<< @/../projects/javascript-sandbox/src/file-system/stream-write.ts | ||
|
||
## 管道流 | ||
|
||
<<< @/../projects/javascript-sandbox/src/file-system/stream-pipe.ts |