| 1996 | ? "lstat" |
| 1997 | : "stat", |
| 1998 | dirCounter = function node_apps_directory_dirCounter(item:string):void { |
| 1999 | let dirlist:string[] = item.split(sep), |
| 2000 | dirpath:string = "", |
| 2001 | index:number = 0; |
| 2002 | dirlist.pop(); |
| 2003 | dirpath = dirlist.join(sep); |
| 2004 | index = dirnames.indexOf(dirpath); |
| 2005 | dircount[index] = dircount[index] - 1; |
| 2006 | if (dircount[index] < 1) { |
| 2007 | // dircount and dirnames are parallel arrays |
| 2008 | dircount.splice(index, 1); |
| 2009 | dirnames.splice(index, 1); |
| 2010 | dirs = dirs - 1; |
| 2011 | if (dirs < 1) { |
| 2012 | if (listonly === true) { |
| 2013 | args.callback(filelist.sort()); |
| 2014 | } else { |
| 2015 | args.callback(list); |
| 2016 | } |
| 2017 | } else { |
| 2018 | node_apps_directory_dirCounter(dirpath); |
| 2019 | } |
| 2020 | } |
| 2021 | }, |
| 2022 | statWrapper = function node_apps_directory_wrapper(filepath:string, parent:number):void { |
| 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.`, |