app.js const fs = require('fs'); fs.watchFile(__dirname + '/modify.js', (curr, prev) => { console.log('Reload file'); delete require.cache[require.resolve('./modify.js')]; }); 이렇게 사용한다면 modify 파일이 변경되고 그럴 때마다 번번히 node app.js 명령어를 사용하여 확인하였던 방법을 최소화 할 수 있습니다. const fs = require('fs'); const modifyFile = './modify.js'; let modify = require(modifyFile); fs.watchFile(__dirname + '/modify.js', (curr,..
Author: 니용 FileOutputStream만 사용하다가 Files가 있다는 것을 알게 되었습니다. 자바 1.7버전부터 지원을 하고 있었습니다. 공식 레퍼런스 문서 링크 Files (Java Platform SE 7 ) Copy a file to a target file. This method copies a file to the target file with the options parameter specifying how the copy is performed. By default, the copy fails if the target file already exists or is a symbolic link, except if the source and target docs.oracle.com ..