{"size": 232, "ext": "js", "max_stars_repo_path": "web/articles/node-async/demo/fs-access.js", "max_stars_repo_name": "xiaoqiang-zhao/my-cellar", "max_stars_repo_stars_event_min_datetime": "2018-08-14T02:52:52.000Z", "max_stars_repo_stars_event_max_datetime": "2021-06-26T11:47:03.000Z", "max_issues_repo_path": "web/articles/node-async/demo/fs-access.js", "max_issues_repo_name": "xiaoqiang-zhao/my-cellar", "max_issues_repo_issues_event_min_datetime": "2019-04-15T15:01:41.000Z", "max_issues_repo_issues_event_max_datetime": "2019-04-15T15:13:47.000Z", "max_forks_repo_path": "web/articles/node-async/demo/fs-access.js", "max_forks_repo_name": "xiaoqiang-zhao/my-cellar", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 12, "max_issues_count": 3, "max_forks_count": null, "avg_line_length": 14.5, "max_line_length": 45, "alphanum_fraction": 0.4396551724}
/**
 * 判断文件是否存在的Demo
 */

const fs = require('fs');
fs.access(__dirname + '/../main.md', err => {
    if (err) {
        // 文件不存在
        console.log('文件不存在');
    }
    else {
        // 文件存在
        console.log('文件存在');
    }
});
