nl_tokens: Initialize the file list information in the given directory . Return the file info structure : { fileName1 : [ fullPath11 fullPath12 ] fileName2 : [ fullPath21 fullPath22 ] }
pl_tokens: function initDirFiles ( dir , cache ) { let cacheDirFiles = { } ; cache . setDirFileListInfo ( dir , cacheDirFiles ) ; let files = fs . readdirSync ( dir ) ; for ( let i = 0 , len = files . length ; i < len ; i ++ ) { let file = files [ i ] ; let fullPath = path . resolve ( dir , file ) ; let stat = getFileState ( fullPath ) ; if ( ! stat || stat . isDirectory ( ) ) { <mask> ; } let fileName = getFileName ( fullPath ) ; let fileList = cacheDirFiles [ fileName ] ; if ( ! fileList ) { fileList = cacheDirFiles [ fileName ] = [ ] ; } fileList . push ( fullPath ) ; } return cacheDirFiles ; }