(item:string)
| 2023 | node.fs[method](filepath, function node_apps_directory_wrapper_stat(er:Error, stat:Stats):void { |
| 2024 | const angrypath:string = `Filepath ${text.angry + filepath + text.none} is not a file or directory.`, |
| 2025 | dir = function node_apps_directory_wrapper_stat_dir(item:string):void { |
| 2026 | node.fs.readdir(item, {encoding: "utf8"}, function node_apps_directory_wrapper_stat_dir_readdirs(erd:Error, files:string[]):void { |
| 2027 | if (erd !== null) { |
| 2028 | apps.errout([erd.toString()]); |
| 2029 | return; |
| 2030 | } |
| 2031 | const index:number = list.length; |
| 2032 | if (listonly === true) { |
| 2033 | filelist.push(item); |
| 2034 | } else { |
| 2035 | list.push([item, "directory", parent, files.length, stat]); |
| 2036 | } |
| 2037 | if (files.length < 1) { |
| 2038 | dirCounter(item); |
| 2039 | } else { |
| 2040 | // dircount and dirnames are parallel arrays |
| 2041 | dircount.push(files.length); |
| 2042 | dirnames.push(item); |
| 2043 | dirs = dirs + 1; |
| 2044 | } |
| 2045 | files.forEach(function node_apps_directory_wrapper_stat_dir_readdirs_each(value:string):void { |
| 2046 | node_apps_directory_wrapper(item + sep + value, index); |
| 2047 | }); |
| 2048 | }); |
| 2049 | }, |
| 2050 | populate = function node_apps_directory_wrapper_stat_populate(type:"link"|"file"|"directory"):void { |
| 2051 | if (exclusions.indexOf(filepath.replace(startPath + sep, "")) < 0) { |
| 2052 | if (listonly === true) { |
no test coverage detected