The Use of Relative Paths for readdir in nodejs

  node.js, question
fs.readdir('../../angular-phonecat', function(err, fileList){
 if (err) throw err;
 console.log(fileList);
 fileList.forEach(function(f) {
 fs.stat(f, function(){
 console.log(arguments);
 })
 })
 })

Error message

[ '.DS_Store',
 '.bowerrc',
 '.git',
 '.gitignore',
 '.jshintrc',
 '.travis.yml',
 'LICENSE',
 'README.md',
 'app',
 'bower.json',
 'karma-26468570',
 'karma-41043336',
 'node_modules',
 'package.json',
 'scripts',
 'test' ]
 { '0': { [Error: ENOENT: no such file or directory, stat '.DS_Store'] errno: -2, code: 'ENOENT', syscall: 'stat', path: '.DS_Store' } }
 { '0': { [Error: ENOENT: no such file or directory, stat '.bowerrc'] errno: -2, code: 'ENOENT', syscall: 'stat', path: '.bowerrc' } }
 { '0': { [Error: ENOENT: no such file or directory, stat '.git'] errno: -2, code: 'ENOENT', syscall: 'stat', path: '.git' } }
 { '0': { [Error: ENOENT: no such file or directory, stat '.jshintrc'] errno: -2, code: 'ENOENT', syscall: 'stat', path: '.jshintrc' } }
 { '0':
 { [Error: ENOENT: no such file or directory, stat '.travis.yml']
 errno: -2,
 code: 'ENOENT',
 syscall: 'stat',
 path: '.travis.yml' } }
 { '0': { [Error: ENOENT: no such file or directory, stat '.gitignore'] errno: -2, code: 'ENOENT', syscall: 'stat', path: '.gitignore' } }
 { '0': { [Error: ENOENT: no such file or directory, stat 'LICENSE'] errno: -2, code: 'ENOENT', syscall: 'stat', path: 'LICENSE' } }
 { '0': { [Error: ENOENT: no such file or directory, stat 'README.md'] errno: -2, code: 'ENOENT', syscall: 'stat', path: 'README.md' } }
 { '0': { [Error: ENOENT: no such file or directory, stat 'app'] errno: -2, code: 'ENOENT', syscall: 'stat', path: 'app' } }
 { '0': { [Error: ENOENT: no such file or directory, stat 'bower.json'] errno: -2, code: 'ENOENT', syscall: 'stat', path: 'bower.json' } }
 { '0':
 { [Error: ENOENT: no such file or directory, stat 'karma-26468570']
 errno: -2,
 code: 'ENOENT',
 syscall: 'stat',
 path: 'karma-26468570' } }
 { '0':
 { [Error: ENOENT: no such file or directory, stat 'karma-41043336']
 errno: -2,
 code: 'ENOENT',
 syscall: 'stat',
 path: 'karma-41043336' } }
 { '0':
 { [Error: ENOENT: no such file or directory, stat 'node_modules']
 errno: -2,
 code: 'ENOENT',
 syscall: 'stat',
 path: 'node_modules' } }
 { '0':
 { [Error: ENOENT: no such file or directory, stat 'package.json']
 errno: -2,
 code: 'ENOENT',
 syscall: 'stat',
 path: 'package.json' } }
 { '0': { [Error: ENOENT: no such file or directory, stat 'scripts'] errno: -2, code: 'ENOENT', syscall: 'stat', path: 'scripts' } }
 { '0': { [Error: ENOENT: no such file or directory, stat 'test'] errno: -2, code: 'ENOENT', syscall: 'stat', path: 'test' } }

Absolute paths are generally used
system variables__dirnameIs the path of the js file where you started the project. You can splice into various paths.
such as

var pathPublic = path.join(__dirname, '/../public/');
 //so that you can use the relative path so that you can get the public directory path higher than the current path.