Page 103 - Nodejs 교과서 개정2판
P. 103

• path.sep  ҃۽੄ ҳ࠙੗ੑפ׮  ਦبח \  104*9ח /ੑפ׮

            • path.delimiter  ജ҃ ߸ࣻ੄ ҳ࠙੗ੑפ׮  process.env.PATHܳ ੑ۱ೞݶ ৈ۞ ѐ੄ ҃۽о ੉ ҳ࠙੗۽
             ҳ࠙غয ੓णפ׮  ਦبח ࣁ޷௒ۿ ;)੉Ҋ  104*9ח ௒ۿ :)ੑפ׮

            • path.dirname(경로)  ౵ੌ੉ ਤ஖ೠ ಫ؊ ҃۽ܳ ࠁৈસפ׮

            • path.extname(경로)  ౵ੌ੄ ഛ੢੗ܳ ࠁৈસפ׮
            • path.basename(경로, ഛ੢੗   ౵ੌ੄ ੉ܴ ഛ੢੗ ನೣ ਸ ಴द೤פ׮  ౵ੌ੄ ੉ܴ݅ ಴दೞҊ र׮ݶ ba

             sename੄ ف ߣ૩ ੋࣻ۽ ౵ੌ੄ ഛ੢੗ܳ ֍ਵݶ ؾפ׮
            • path.parse(경로)  ౵ੌ ҃۽ܳ root  dir  base  ext  nameਵ۽ ܻ࠙೤פ׮

            • path.format(객체)  path.parse()ೠ ё୓ܳ ౵ੌ ҃۽۽ ೤஝פ׮
            • path.normalize(경로)  /ա \ܳ पࣻ۽ ৈ۞ ߣ ࢎਊ೮Ѣա ഒਊ೮ਸ ٸ ੿࢚੸ੋ ҃۽۽ ߸ജ೤פ׮

            • path.isAbsolute(경로)  ౵ੌ੄ ҃۽о ੺؀҃۽ੋ૑ ࢚؀҃۽ੋ૑ܳ trueա false۽ ঌ݀פ׮

            • path.relative(기준경로,	비교경로)  ҃۽ܳ ف ѐ ֍ਵݶ ୐ ߣ૩ ҃۽ীࢲ ف ߣ૩ ҃۽۽ оח ߑߨਸ
             ঌ݀פ׮

            • path.join(경로,	…)  ৈ۞ ੋࣻܳ ֍ਵݶ ೞա੄ ҃۽۽ ೤஝פ׮  ࢚؀҃۽ੋ    ࠗݽ ٣۩ఠܻ җ   അ ਤ
             ஖ ب ঌইࢲ ୊ܻ೤פ׮

            • path.resolve(경로,	…)  path.join()җ ࠺तೞ૑݅ ର੉о ੓णפ׮  ର੉੼਷ ׮਺ী աয়ח /PUFীࢲ
             ࢸݺ೤פ׮



           /PUF ™ KPJOҗ SFTPMWF੄ ର੉

           path.joinҗ path.resolve ݫࢲ٘ח ࠺त೧ ࠁ੉૑݅ ز੘ ߑध੉ ׮ܵפ׮   ܳ ݅աݶ path.resolveח ੺؀҃۽۽ ੋध

           ೧ࢲ খ੄ ҃۽ܳ ޖदೞҊ  path.join਷ ࢚؀҃۽۽ ୊ܻ೤פ׮  ௏٘۽ ࠁݶ ੉೧ೞӝ औणפ׮



            path.join('/a',	'/b',	'c');		/*		결과	:	/a/b/c/	*/
            path.resolve('/a',	'/b',	'c');		/*		결과	:	/b/c	*/






           /PUF ™ যڃ ٸ ==ܳ ࢎਊೞҊ যڃ ٸ =ܳ ࢎਊೞաਃ

           ௑ࣛ Ѿҗܳ ࠁݶ যڃ ٸח ==ܳ ࢎਊೞҊ  যڃ ٸח Ӓր =ܳ ࢎਊೞৈ ਦب ҃۽ܳ ಴द೮णפ׮  ӝࠄ੸ਵ۽ ҃۽ח = ೞա
           ܳ ࢎਊ೧ࢲ ಴द೤פ׮  ೞ૑݅ ੗߄झ௼݀౟ ޙ੗ৌীࢲח =о ౠࣻ ޙ੗੉޲۽ =ܳ ف ѐ ࠢৈ ҃۽ܳ ಴द೧ঠ ೤פ׮  ৘

           ܳ ٜয \n਷ ੗߄झ௼݀౟ ޙ੗ৌীࢲ ઴߄Է੉ۄח ڷ੉޲۽  $ =OPEF৬ э਷ ҃۽ীࢲ ੄بೞ૑ ঋ਷ য়ܨо ߊࢤೡ ࣻ ੓
           णפ׮  ੉ٸח $ ==OPEF୊ۢ ಴द೧ঠ ೤פ׮

           QBUI ݽٕ਷ ਤ৬ э਷ ҃਋ী ߊࢤೞח ޙઁܳ ঌইࢲ ୊ܻ೤פ׮  ੉ח ਦبীࢲ QBUI ݽٕ੉ ԙ ೙ਃೠ ੉ਬ੉ӝب ೤פ׮





           /PUF ™ ࢚؀҃۽৬ ੺؀҃۽
   98   99   100   101   102   103   104   105   106   107   108