Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readAllFiles issue #14

Closed
biud436 opened this issue Jan 8, 2020 · 0 comments
Closed

readAllFiles issue #14

biud436 opened this issue Jan 8, 2020 · 0 comments

Comments

@biud436
Copy link
Owner

biud436 commented Jan 8, 2020

readAllFiles(root, ext, files) {
if(!root) return;
var self = this;
if(!fs.existsSync(root)) return;
var contents = fs.readdirSync(root, 'utf8');
contents = contents.map(function(e) {
return path.join(root, e);
});
contents.forEach(function(sub) {
if(fs.statSync(sub).isDirectory()) {
self.readAllFiles(sub, ext, files);
} else if(fs.statSync(sub).isFile()) {
if(path.extname(sub) === ext) {
files.push(sub.replace(/\\/g, "/"));
}
}
});
}

To do

  • ext parameter를 Array type로 변경하기
  • Create a file called Game.rpgproject
biud436 added a commit that referenced this issue Jan 8, 2020
@biud436 biud436 closed this as completed Jan 8, 2020
biud436 added a commit that referenced this issue Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant