diff --git "a/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/common.txt" "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/common.txt" new file mode 100644 index 0000000000000000000000000000000000000000..d7ae5e6c97f4862ef3b445b0d4044fc839ee7bd1 --- /dev/null +++ "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/common.txt" @@ -0,0 +1 @@ +第1个第2个第3个第4个第5个第7个第6个第8个第9个第10个 \ No newline at end of file diff --git "a/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/demo01.js" "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/demo01.js" new file mode 100644 index 0000000000000000000000000000000000000000..8fb60d63a69f6ce66669607fefdb4ed5f118143e --- /dev/null +++ "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/demo01.js" @@ -0,0 +1,28 @@ +let fs = require("fs"); + +fs.writeFile('./common.txt','',(err)=>{ + if(err) return console.log('写入失败'); + for (let i = 1; i <= 10; i++) { + fs.writeFile(`第${i}个文件.txt`, `第${i}个`, err => { + if (err) return console.log("写入文件失败", err); + let path=`./第${i}个文件.txt`; + console.log(path); + + fs.readFile(path,(err,data)=>{ + if(err){ + console.log("文件读取失败"); + }else{ + let str=data.toString(); + fs.appendFile('./common.txt',str,(err,data)=>{ + if(err){ + console.log('文件追加失败'); + }else{ + console.log('文件追加成功'); + } + }) + } + }) + + }) + } +}) diff --git "a/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\25410\344\270\252\346\226\207\344\273\266.txt" "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\25410\344\270\252\346\226\207\344\273\266.txt" new file mode 100644 index 0000000000000000000000000000000000000000..56a9f6d88266fc4210bf2c7750e0060ffa9d1685 --- /dev/null +++ "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\25410\344\270\252\346\226\207\344\273\266.txt" @@ -0,0 +1 @@ +第10个 \ No newline at end of file diff --git "a/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2541\344\270\252\346\226\207\344\273\266.txt" "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2541\344\270\252\346\226\207\344\273\266.txt" new file mode 100644 index 0000000000000000000000000000000000000000..899a7f8975e17499a309e49e51256238f93272a6 --- /dev/null +++ "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2541\344\270\252\346\226\207\344\273\266.txt" @@ -0,0 +1 @@ +第1个 \ No newline at end of file diff --git "a/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2542\344\270\252\346\226\207\344\273\266.txt" "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2542\344\270\252\346\226\207\344\273\266.txt" new file mode 100644 index 0000000000000000000000000000000000000000..9c523d2213fda901a1a3b8ffea7c33e40d0004db --- /dev/null +++ "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2542\344\270\252\346\226\207\344\273\266.txt" @@ -0,0 +1 @@ +第2个 \ No newline at end of file diff --git "a/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2543\344\270\252\346\226\207\344\273\266.txt" "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2543\344\270\252\346\226\207\344\273\266.txt" new file mode 100644 index 0000000000000000000000000000000000000000..192bbc839b7fa601b4ea3d49881c77faeac4e3dd --- /dev/null +++ "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2543\344\270\252\346\226\207\344\273\266.txt" @@ -0,0 +1 @@ +第3个 \ No newline at end of file diff --git "a/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2544\344\270\252\346\226\207\344\273\266.txt" "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2544\344\270\252\346\226\207\344\273\266.txt" new file mode 100644 index 0000000000000000000000000000000000000000..174202bfa9b51e6b1cb072339ebf54b860e67eec --- /dev/null +++ "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2544\344\270\252\346\226\207\344\273\266.txt" @@ -0,0 +1 @@ +第4个 \ No newline at end of file diff --git "a/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2545\344\270\252\346\226\207\344\273\266.txt" "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2545\344\270\252\346\226\207\344\273\266.txt" new file mode 100644 index 0000000000000000000000000000000000000000..4cfd900affc2cba957f5c882c693d0226e6bcc70 --- /dev/null +++ "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2545\344\270\252\346\226\207\344\273\266.txt" @@ -0,0 +1 @@ +第5个 \ No newline at end of file diff --git "a/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2546\344\270\252\346\226\207\344\273\266.txt" "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2546\344\270\252\346\226\207\344\273\266.txt" new file mode 100644 index 0000000000000000000000000000000000000000..8c1cb502629b4f9400e4383b1a5565c5159c9f44 --- /dev/null +++ "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2546\344\270\252\346\226\207\344\273\266.txt" @@ -0,0 +1 @@ +第6个 \ No newline at end of file diff --git "a/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2547\344\270\252\346\226\207\344\273\266.txt" "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2547\344\270\252\346\226\207\344\273\266.txt" new file mode 100644 index 0000000000000000000000000000000000000000..792e4f2aebcb476e918e26a0e7cc63b12e24eaa6 --- /dev/null +++ "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2547\344\270\252\346\226\207\344\273\266.txt" @@ -0,0 +1 @@ +第7个 \ No newline at end of file diff --git "a/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2548\344\270\252\346\226\207\344\273\266.txt" "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2548\344\270\252\346\226\207\344\273\266.txt" new file mode 100644 index 0000000000000000000000000000000000000000..370522b2160ffe3e9505fe10b5c42ab9f53205d4 --- /dev/null +++ "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2548\344\270\252\346\226\207\344\273\266.txt" @@ -0,0 +1 @@ +第8个 \ No newline at end of file diff --git "a/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2549\344\270\252\346\226\207\344\273\266.txt" "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2549\344\270\252\346\226\207\344\273\266.txt" new file mode 100644 index 0000000000000000000000000000000000000000..d53694d47da7e7a46fb23a81a672abc815b28a97 --- /dev/null +++ "b/\345\273\226\346\226\207\346\235\260/\346\226\207\344\273\266\350\257\273\345\217\226\344\275\234\344\270\232/\347\254\2549\344\270\252\346\226\207\344\273\266.txt" @@ -0,0 +1 @@ +第9个 \ No newline at end of file