-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
83f4931
commit beb7c6e
Showing
277 changed files
with
40,882 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,28 @@ | ||
/** | ||
* @Author csxiaoyao | ||
* @DateTime 2017-06-20 | ||
* @copyright [copyright] | ||
* @license [license] | ||
* @version [version] | ||
*/ | ||
|
||
// 【普通阻塞方式】 | ||
// sunshine studio | ||
// 程序执行结束! | ||
var fs = require("fs"); | ||
var data = fs.readFileSync('input.txt'); | ||
console.log(data.toString()); | ||
console.log("程序执行结束!"); | ||
|
||
// 【回调函数方式】 | ||
// 程序执行结束! | ||
// sunshine studio | ||
var fs = require("fs"); | ||
fs.readFile('input.txt', function (err, data) { | ||
if (err) { | ||
console.log(err.stack); | ||
return; | ||
} | ||
console.log(data.toString()); | ||
}); | ||
console.log("程序执行结束!"); |
Oops, something went wrong.