Node.js 강좌 자료] path 모듈
Node.js 강좌 자료] path 모듈
실무개발자를위한 실무교육 전문교육센터학원
www.oraclejava.co.kr에 오시면 보다 다양한 강좌를 보실 수 있습니다.
path 모듈
- 모듈 임포트
: var path = require('path);
- 예제
:
var path = require('path');
console.log(path.normalize('/test/test1//2slashes/1slashes/tab/..'));
console.log(
path.join('/test', 'test1', '2slashes/1slashes', 'tab', '..')); console.log(path.resolve('main.js')); console.log(path.extname('main.js'));
\test\test1\2slashes\1slashes
\test\test1\2slashes\1slashes
d:\dev\workingon\full-stack\nodejs\lab\nodejs-tutorialspoint\main.js
.js
'자바' 카테고리의 다른 글
Node.js 강좌 자료] dns 모듈 (0) | 2017.11.19 |
---|---|
Node.js 강좌 자료] net 모듈 (0) | 2017.11.19 |
Node.js 강좌 자료] os 모듈 (0) | 2017.11.12 |
Node.js 강좌 자료] 유틸리티 모듈 (0) | 2017.11.12 |
Node.js 강좌 자료] 전역 객체 (0) | 2017.11.12 |