반응형

function getFileLists(path){
    var fileList = fs.readdirSync(path);
    for(obj of fileList){
        var stat = fs.statSync(path + "/" + obj)
        if(stat.isDirectory()){
            getFileLists(path + "/" + obj)
        }else{
            console.log(path + "/" + obj)
        }
    }
}

반응형

'Web > node.js' 카테고리의 다른 글

Node.js] passport를 ajax로 호출하여 사용 할 때  (0) 2021.08.31
Selenium Javascript Screenshot  (0) 2021.05.10
Posted by kev1n
,