Page 101 - Nodejs 교과서 개정2판
P. 101
os.cpus().lengthܳ ೞݶ য ѐࣻо ं۽ ա২פ ೞ݅ ֢٘ীࢲ यӖ झۨ٘ ۽Ӓې߁ਸ ೞݶ যо ݻ ѐ
ٚ ࢚ҙহ ࠗ࠙ ҃ যܳ ೞա߆ী ࢎਊೞ ঋणפ ೞ݅ ী աয়ח DMVTUFS ݽٕਸ ࢎਊೞח ҃ীח
য ѐࣻী ݏࢲ ۽ࣁझܳ טܾ ࣻ णפ ٸ cpus() ݫࢲ٘ܳ ࢎਊೡ Ѫੑפ
ઁীח ֍ ঋও݅ os.constantsۄח ёо णפ Ӓ উীח пઙ ী۞৬ नഐী ೠ ࠁо ѹ
णפ ী۞о ߊࢤ೮ਸ ٸ EADDRINUSEա ECONNRESET э ী۞ ٘ܳ ೣԋ ࠁৈસפ ۞ೠ ٜ٘
os.constants উী ٜয णפ ী۞ ٘о ցޖ ݆ইࢲ ৻ ࣻ হਵ۽ ߊࢤೡ ٸ݃ Ѩ࢝೧ࠁח Ѫ
જणפ
PT ݽٕ ۽ ஹೊఠ ղࠗ ਗী ࠼ߣೞѱ Ӕೞח ҃ ࢎਊؾפ ੌ߈ੋ ਢ ࢲ࠺झܳ ઁೡ ٸח
ࢎਊ ࠼بо ֫ ঋणפ ೞ݅ ઁ߹۽ ܲ ࢲ࠺झܳ ઁҕೞҊ रਸ ٸ PT ݽٕ ਬਊೡ Ѫੑפ
QBUI
ಫ؊৬ ੌ ҃۽ܳ औѱ ઑೞب۾ ب৬ח ݽٕੑפ QBUI ݽٕ ਃೠ ਬ ೞաח ઁ߹۽
҃۽ ҳ࠙о ܰӝ ٸޙੑפ ѱ ਦب ఋੑҗ 104*9 ఋੑਵ۽ ҳ࠙ؾפ 104*9ח ਬץझ ӝ߈
ઁٜਸ ೞݴ ݓҗ ֿܻझо ࣘ೧ णפ
• ਦب $ =6TFST=;FSP$IPۢ =۽ ҳ࠙פ
• 104*9 IPNF [FSPDIPۢ ۽ ҳ࠙פ
ٮۄࢲ ݓա ֿܻझীࢲ ઁܳ पणೞҊ ݶ \ न /о աয়ח Ѫ ࢚ੑפ
৻ীب ੌ ҃۽ীࢲ ੌݺա ഛ݅ ٮ۽ ڍযח ӝמਸ ҳഅ೧فয ҳഅೞ ঋҊب ಞܻೞѱ
ࢎਊೡ ࣻ णפ
QBUI ݽٕ ࣘࢿҗ ݫࢲ٘ܳ ঌইࠇद
path.js
const path = require('path');
const string = __filename;
console.log('path.sep:', path.sep);
console.log('path.delimiter:', path.delimiter);
console.log('------------------------------');
console.log('path.dirname():', path.dirname(string));
console.log('path.extname():', path.extname(string));
console.log('path.basename():', path.basename(string));
console.log('path.basename - extname:', path.basename(string, path.extname(string)));
console.log('------------------------------');
console.log('path.parse()', path.parse(string));