nl_tokens: 遍历当前文件夹下的文件并进行回调操作
pl_tokens: function traverseFilesAndCb ( curDir , cb ) { let fileDirs = [ curDir ] ; while ( fileDirs . length ) { let currDir = fileDirs . pop ( ) ; let files = fs . readdirSync ( currDir ) ; for ( let i = 0 , len = files . length ; i < len ; i ++ ) { let fileName = files [ i ] ; if ( / ^\. / . test ( fileName ) ) { <mask> ; } let fullPath = path . resolve ( currDir , fileName ) ; let stat = getFileState ( fullPath ) ; if ( ! stat ) { continue ; } let isDir = stat . isDirectory ( ) ; if ( isDir ) { fileDirs . push ( fullPath ) ; continue ; } if ( typeof cb === 'function' ) { cb ( fullPath ) ; } } } }