You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							20 lines
						
					
					
						
							457 B
						
					
					
				
			
		
		
		
			
			
			
		
		
	
	
							20 lines
						
					
					
						
							457 B
						
					
					
				
								var fs = require('graceful-fs')
							 | 
						|
								var path = require('path')
							 | 
						|
								
							 | 
						|
								var walkSync = function (dir, filelist) {
							 | 
						|
								  var files = fs.readdirSync(dir)
							 | 
						|
								  filelist = filelist || []
							 | 
						|
								  files.forEach(function (file) {
							 | 
						|
								    var nestedPath = path.join(dir, file)
							 | 
						|
								    if (fs.lstatSync(nestedPath).isDirectory()) {
							 | 
						|
								      filelist = walkSync(nestedPath, filelist)
							 | 
						|
								    } else {
							 | 
						|
								      filelist.push(nestedPath)
							 | 
						|
								    }
							 | 
						|
								  })
							 | 
						|
								  return filelist
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								module.exports = {
							 | 
						|
								  walkSync: walkSync
							 | 
						|
								}
							 | 
						|
								
							 |