diff --git a/README.en.md b/README.en.md deleted file mode 100644 index a80135a4838b2570c000e31f6fcfaa09bef52ab1..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# 21届5班node作业 - -#### Description -作业 - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md deleted file mode 100644 index c2c6292445089b12484c27351ad513d6bdaf007b..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# 21届5班node作业 - -#### 介绍 -作业 - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git "a/\345\220\264\345\223\262\346\266\224/node\346\226\207\344\273\266\347\224\237\346\210\220\346\227\266\351\227\264\350\256\241\347\256\227/index.js" "b/\345\220\264\345\223\262\346\266\224/node\346\226\207\344\273\266\347\224\237\346\210\220\346\227\266\351\227\264\350\256\241\347\256\227/index.js" new file mode 100644 index 0000000000000000000000000000000000000000..1456a413759a57baaa807aeee7e5991610bdb555 --- /dev/null +++ "b/\345\220\264\345\223\262\346\266\224/node\346\226\207\344\273\266\347\224\237\346\210\220\346\227\266\351\227\264\350\256\241\347\256\227/index.js" @@ -0,0 +1,19 @@ +//用同步异步分别生成1000个文件,分别同步的耗时异步的耗时 +let fs = require("fs"); + +fs.existsSync("./同步文件夹") ? null : fs.mkdirSync("./同步文件夹"); +var time = new Date().getTime(); +for (var i = 1; i <= 1000; i++) { + fs.writeFileSync("./同步文件夹/" + i + ".txt", "文本信息"); + i == 1000 ? console.log("同步操作文件生成时间:" + (new Date().getTime() - time) + "毫秒") : null; +} + +fs.existsSync("./异步文件夹") ? null : fs.mkdirSync("./异步文件夹"); +var num = 0; +time = new Date().getTime(); +for (var i = 1; i <= 1000; i++) { + fs.writeFile("./异步文件夹/" + i + ".txt", "文本信息", (err) => { + err == null ? num++ : console.log(err); + num == 1000 ? console.log("异步操作文件生成时间:" + (new Date().getTime() - time) + "毫秒") : null; + }); +} \ No newline at end of file