Search

ํŒŒ์ผ ์‹œ์Šคํ…œ

ํŒŒ์ผ ์‹œ์Šคํ…œ

Node.js์—์„œ ํŒŒ์ผ ์‹œ์Šคํ…œ์„ ๋‹ค๋ฃจ๊ธฐ ์œ„ํ•ด ๊ธฐ๋ณธ์ ์œผ๋กœ fs (File System) ๋ชจ๋“ˆ์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ์ด ๋ชจ๋“ˆ์€ ํŒŒ์ผ ์ฝ๊ธฐ, ์“ฐ๊ธฐ, ์‚ญ์ œ, ์ด๋™, ์ด๋ฆ„ ๋ณ€๊ฒฝ ๋“ฑ ๋‹ค์–‘ํ•œ ํŒŒ์ผ ์‹œ์Šคํ…œ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•ด์ค๋‹ˆ๋‹ค.

fs

: ํŒŒ์ผ ์‹œ์Šคํ…œ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๊ธฐ ์œ„ํ•œ ๋ชจ๋“ˆ

๋ฌธ๋ฒ•

const fs = require('fs');
JavaScript
๋ณต์‚ฌ

fs ๋ชจ๋“ˆ ์ฃผ์š” ๋ฉ”์†Œ๋“œ ๋ฐ ์†์„ฑ

๋ฉ”์†Œ๋“œ ๋ฐ ์†์„ฑ
์„ค๋ช…
fs.readFile()
ํŒŒ์ผ์„ ๋น„๋™๊ธฐ์ ์œผ๋กœ ์ฝ์Šต๋‹ˆ๋‹ค.
fs.writeFile()
ํŒŒ์ผ์— ๋‚ด์šฉ์„ ๋น„๋™๊ธฐ์ ์œผ๋กœ ์”๋‹ˆ๋‹ค.
fs.unlink()
ํŒŒ์ผ์„ ๋น„๋™๊ธฐ์ ์œผ๋กœ ์‚ญ์ œํ•ฉ๋‹ˆ๋‹ค.
fs.mkdir()
๋””๋ ‰ํ† ๋ฆฌ๋ฅผ ๋น„๋™๊ธฐ์ ์œผ๋กœ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
fs.readdir()
๋””๋ ‰ํ† ๋ฆฌ์˜ ํŒŒ์ผ ๋ชฉ๋ก์„ ๋น„๋™๊ธฐ์ ์œผ๋กœ ์ฝ์–ด์˜ต๋‹ˆ๋‹ค.
fs.rename()
ํŒŒ์ผ ๋˜๋Š” ๋””๋ ‰ํ† ๋ฆฌ์˜ ์ด๋ฆ„์„ ๋น„๋™๊ธฐ์ ์œผ๋กœ ๋ณ€๊ฒฝํ•ฉ๋‹ˆ๋‹ค.

ํŒŒ์ผ ์ฝ๊ธฐ (fs.readFile)

โ€ข
ํŒŒ์ผ์˜ ๋‚ด์šฉ์„ ๋น„๋™๊ธฐ์ ์œผ๋กœ ์ฝ์–ด์˜ต๋‹ˆ๋‹ค.
fs.readFile(path, [options], callback);
JavaScript
๋ณต์‚ฌ
const fs = require('fs'); fs.readFile('example.txt', 'utf8', (err, data) => { if (err) { console.error('Error reading file:', err); return; } console.log('File content:', data); });
JavaScript
๋ณต์‚ฌ

ํŒŒ์ผ ์“ฐ๊ธฐ (fs.writeFile)

โ€ข
ํŒŒ์ผ์— ๋‚ด์šฉ์„ ๋น„๋™๊ธฐ์ ์œผ๋กœ ์”๋‹ˆ๋‹ค.
fs.writeFile(path, [options], callback);
JavaScript
๋ณต์‚ฌ
const fs = require('fs'); const contentToWrite = 'Hello, Node.js!'; fs.writeFile('newFile.txt', contentToWrite, 'utf8', (err) => { if (err) { console.error('Error writing file:', err); return; } console.log('File has been written.'); });
JavaScript
๋ณต์‚ฌ

ํŒŒ์ผ ์‚ญ์ œ (fs.unlink)

โ€ข
ํŒŒ์ผ์„ ๋น„๋™๊ธฐ์ ์œผ๋กœ ์‚ญ์ œํ•ฉ๋‹ˆ๋‹ค.
fs.unlink(path, callback);
JavaScript
๋ณต์‚ฌ
const fs = require('fs'); fs.unlink('fileToDelete.txt', (err) => { if (err) { console.error('Error deleting file:', err); return; } console.log('File has been deleted.'); });
JavaScript
๋ณต์‚ฌ

๋””๋ ‰ํ† ๋ฆฌ ์ƒ์„ฑ (fs.mkdir):

โ€ข
๋””๋ ‰ํ† ๋ฆฌ๋ฅผ ๋น„๋™๊ธฐ์ ์œผ๋กœ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
fs.mkdir(path, [options], callback);
JavaScript
๋ณต์‚ฌ
const fs = require('fs'); fs.mkdir('newDirectory', (err) => { if (err) { console.error('Error creating directory:', err); return; } console.log('Directory has been created.'); });
JavaScript
๋ณต์‚ฌ

๋””๋ ‰ํ† ๋ฆฌ ์ฝ๊ธฐ (fs.readdir):

โ€ข
๋””๋ ‰ํ† ๋ฆฌ์˜ ํŒŒ์ผ ๋ชฉ๋ก์„ ๋น„๋™๊ธฐ์ ์œผ๋กœ ์ฝ์–ด์˜ต๋‹ˆ๋‹ค.
fs.readdir(path, [options], callback);
JavaScript
๋ณต์‚ฌ
const fs = require('fs'); fs.readdir('directoryToRead', (err, files) => { if (err) { console.error('Error reading directory:', err); return; } console.log('Files in the directory:', files); });
JavaScript
๋ณต์‚ฌ

ํŒŒ์ผ ์ด๋™ ๋˜๋Š” ์ด๋ฆ„ ๋ณ€๊ฒฝ (fs.rename):

โ€ข
ํŒŒ์ผ ๋˜๋Š” ๋””๋ ‰ํ† ๋ฆฌ์˜ ์ด๋ฆ„์„ ๋น„๋™๊ธฐ์ ์œผ๋กœ ๋ณ€๊ฒฝํ•ฉ๋‹ˆ๋‹ค.
fs.rename(oldPath, newPath, callback);
JavaScript
๋ณต์‚ฌ
const fs = require('fs'); fs.rename('oldName.txt', 'newName.txt', (err) => { if (err) { console.error('Error renaming file:', err); return; } console.log('File has been renamed.'); });
JavaScript
๋ณต์‚ฌ

์‚ฌ์šฉ ๋ชฉ์ 

โ€ข
ํŒŒ์ผ์˜ ์ฝ๊ธฐ, ์“ฐ๊ธฐ, ์‚ญ์ œ ๋“ฑ์˜ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•  ๋•Œ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.
โ€ข
๋””๋ ‰ํ† ๋ฆฌ์˜ ์ƒ์„ฑ, ์ฝ๊ธฐ, ํŒŒ์ผ์˜ ์ด๋™ ๋˜๋Š” ์ด๋ฆ„ ๋ณ€๊ฒฝ ๋“ฑ ํŒŒ์ผ ์‹œ์Šคํ…œ ๊ด€๋ฆฌ์— ํ™œ์šฉ๋ฉ๋‹ˆ๋‹ค.

๋™๊ธฐ ๋ฉ”์†Œ๋“œ์™€ ๋น„๋™๊ธฐ ๋ฉ”์†Œ๋“œ

๋น„๋™๊ธฐ์‹ ํŒŒ์ผ ์ž…๋ ฅ

const fs = require('fs'); console.log('์‹œ์ž‘'); fs.readFile('./test1.txt', (err, data) => { if (err) { throw err; } console.log('1๋ฒˆ', data.toString()); }); fs.readFile('./test2.txt', (err, data) => { if (err) { throw err; } console.log('2๋ฒˆ', data.toString()); }); fs.readFile('./test3.txt', (err, data) => { if (err) { throw err; } console.log('3๋ฒˆ', data.toString()); }); console.log('๋');
JavaScript
๋ณต์‚ฌ

๋™๊ธฐ์‹ ํŒŒ์ผ ์ž…๋ ฅ

const fs = require('fs'); console.log('์‹œ์ž‘'); let data = fs.readFileSync('./test1.txt'); console.log('1๋ฒˆ', data.toString()); data = fs.readFileSync('./test2.txt'); console.log('2๋ฒˆ', data.toString()); data = fs.readFileSync('./test3.txt'); console.log('3๋ฒˆ', data.toString()); console.log('๋');
JavaScript
๋ณต์‚ฌ

์ˆœ์„œ๋ฅผ ์œ ์ง€ํ•˜๊ธฐ ์œ„ํ•œ, ์ฝœ๋ฐฑ ๊ธฐ๋ฐ˜ ๋น„๋™๊ธฐ์‹ ํŒŒ์ผ ์ž…๋ ฅ

const fs = require('fs'); console.log('์‹œ์ž‘'); fs.readFile('./test1.txt', (err, data) => { console.log('1๋ฒˆ', data.toString()); fs.readFile('./test1.txt', (err, data) => { console.log('2๋ฒˆ', data.toString()); fs.readFile('./test1.txt', (err, data) => { console.log('3๋ฒˆ', data.toString()); fs.readFile('./test1.txt', (err, data) => { console.log('4๋ฒˆ', data.toString()); fs.readFile('./test1.txt', (err, data) => { console.log('5๋ฒˆ', data.toString()); fs.readFile('./test1.txt', (err, data) => { console.log('6๋ฒˆ', data.toString()); fs.readFile('./test1.txt', (err, data) => { console.log('7๋ฒˆ', data.toString()); fs.readFile('./test1.txt', (err, data) => { console.log('8๋ฒˆ', data.toString()); fs.readFile('./test1.txt', (err, data) => { console.log('9๋ฒˆ', data.toString()); fs.readFile('./test1.txt', (err, data) => { console.log('10๋ฒˆ', data.toString()); console.log('๋'); }); }); }); }); }); }); }); }); }); });
JavaScript
๋ณต์‚ฌ

์ฝœ๋ฐฑ์ง€์˜ฅ

: ์ฝœ๋ฐฑํ•จ์ˆ˜ ๊ธฐ๋ฐ˜, ๋น„๋™๊ธฐ์‹ ์š”์ฒญ์œผ๋กœ ์ˆœ์„œ๋ฅผ ์œ ์ง€ํ•˜๋ ค๊ณ  ํ•  ๋•Œ, ์ฝœ๋ฐฑ์ด ๋๋‚˜์ง€ ์•Š๋Š” ์ง€์˜ฅ์ด ๋˜์–ด๋ฒ„๋ฆฐ๋‹ค.

์ˆœ์„œ๋ฅผ ์œ ์ง€ํ•˜๊ธฐ ์œ„ํ•œ, Promise ๊ธฐ๋ฐ˜ ๋น„๋™๊ธฐ์‹ ํŒŒ์ผ ์ž…๋ ฅ

const fs = require('fs').promises; console.log('์‹œ์ž‘'); fs.readFile('./test1.txt') .then((data) => { console.log('1๋ฒˆ', data.toString()); return fs.readFile('./test2.txt'); }) .then((data) => { console.log('2๋ฒˆ', data.toString()); return fs.readFile('./test3.txt'); }) .then((data) => { console.log('3๋ฒˆ', data.toString()); console.log('๋'); }) .catch((err) => { console.error(err); });
JavaScript
๋ณต์‚ฌ

๋ฒ„ํผ (Buffer)

์ •์˜

๋ฒ„ํผ๋Š” ์ผ๋ จ์˜ ๋ฐ์ดํ„ฐ๋ฅผ ์ž„์‹œ๋กœ ์ €์žฅํ•˜๋Š” ๊ณต๊ฐ„์œผ๋กœ, ์ฃผ๋กœ ์ด์ง„ ๋ฐ์ดํ„ฐ๋ฅผ ๋‹ค๋ฃฐ ๋•Œ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. Node.js์—์„œ๋Š” Buffer ํด๋ž˜์Šค๋ฅผ ์ œ๊ณตํ•˜์—ฌ ์ด์ง„ ๋ฐ์ดํ„ฐ๋ฅผ ๋‹ค๋ฃจ๊ธฐ ์œ„ํ•œ ๋ฉ”๋ชจ๋ฆฌ ๊ณต๊ฐ„์„ ํ• ๋‹นํ•˜๊ณ  ์กฐ์ž‘ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
๋ฒ„ํผ๋ง : ๋ฐ์ดํ„ฐ ํ๋ฆ„์„ ์กฐ์ ˆํ•˜๊ธฐ ์œ„ํ•ด, ๋ฐ์ดํ„ฐ ์ „์†ก์— ํ•„์š”ํ•œ ์ตœ์†Œํ•œ์˜ ๋ฐ์ดํ„ฐ๋ฅผ ์ž„์‹œ ๋ฉ”๋ชจ๋ฆฌ ๊ณต๊ฐ„์— ์ €์žฅํ•˜๋Š” ๊ณผ์ •

์ƒ๊ฐํ•ด๋ณด๊ธฐ

โ€ข
์ปดํ“จํ„ฐ ์‚ฌ์–‘ - RAM 4GB
1.
์›๋ณธ ํŒŒ์ผ ์šฉ๋Ÿ‰ : 1GB, ๋ฒ„ํผ 1GB, ๋‹ค์šด๋กœ๋“œ ๋™์‹œ ์š”์ฒญ ๊ฐ€๋Šฅ ์‚ฌ์šฉ์ž ์ˆ˜ : 4๋ช…
2.
์›๋ณธ ํŒŒ์ผ ์šฉ๋Ÿ‰ : 1GB, ๋ฒ„ํผ 1MB, ๋‹ค์šด๋กœ๋“œ ๋™์‹œ ์š”์ฒญ ์‚ฌ์šฉ์ž ์ˆ˜ : 4000๋ช…

์ฃผ์š” ํŠน์ง•

1.
๊ณ ์ •๋œ ํฌ๊ธฐ: ๋ฒ„ํผ๋Š” ์ƒ์„ฑ ์‹œ ํฌ๊ธฐ๊ฐ€ ๊ณ ์ •๋˜๋ฉฐ, ํฌ๊ธฐ๋ฅผ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
2.
์‹œํ€€์Šค๋กœ ๋ฐ์ดํ„ฐ ์•ก์„ธ์Šค: ๋ฒ„ํผ์˜ ๋‚ด์šฉ์€ ๋ฐ”์ดํŠธ์˜ ์‹œํ€€์Šค๋กœ ๊ตฌ์„ฑ๋˜๋ฉฐ, ๊ฐ ๋ฐ”์ดํŠธ๋Š” ์ธ๋ฑ์Šค๋ฅผ ํ†ตํ•ด ์ ‘๊ทผ๋ฉ๋‹ˆ๋‹ค.
3.
์ด์ง„ ๋ฐ์ดํ„ฐ ๋‹ค๋ฃจ๊ธฐ: ์ฃผ๋กœ ํŒŒ์ผ์ด๋‚˜ ๋„คํŠธ์›Œํฌ์—์„œ ์ „์†ก๋˜๋Š” ์ด์ง„ ๋ฐ์ดํ„ฐ๋ฅผ ๋‹ค๋ฃฐ ๋•Œ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.

์ฃผ์š” ์†์„ฑ ๋ฐ ๋ฉ”์†Œ๋“œ

๋ฉ”์†Œ๋“œ/์†์„ฑ
์„ค๋ช…
Buffer.from()
์ฃผ์–ด์ง„ ๋ฐ์ดํ„ฐ๋กœ ์ƒˆ๋กœ์šด ๋ฒ„ํผ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
toString()
๋ฒ„ํผ์˜ ๋‚ด์šฉ์„ ๋ฌธ์ž์—ด๋กœ ๋ณ€ํ™˜ํ•ฉ๋‹ˆ๋‹ค.
concat()
์—ฌ๋Ÿฌ ๋ฒ„ํผ๋ฅผ ํ•˜๋‚˜๋กœ ํ•ฉ์นฉ๋‹ˆ๋‹ค.
Buffer.alloc()
์ง€์ •๋œ ํฌ๊ธฐ์˜ ์ƒˆ๋กœ์šด ๋ฒ„ํผ๋ฅผ ์ƒ์„ฑํ•˜๊ณ  ์ดˆ๊ธฐํ™”ํ•ฉ๋‹ˆ๋‹ค.

Buffer.from()

// ๋ฌธ์ž์—ด์„ ๋ฒ„ํผ๋กœ ๋ณ€ํ™˜ const bufferFromStr = Buffer.from('Hello, Buffer!', 'utf8'); // ๋ฐฐ์—ด์„ ๋ฒ„ํผ๋กœ ๋ณ€ํ™˜ const bufferFromArray = Buffer.from([1, 2, 3, 4, 5]); // ๋ฒ„ํผ๋ฅผ ๋ณต์‚ฌํ•˜์—ฌ ์ƒˆ๋กœ์šด ๋ฒ„ํผ ์ƒ์„ฑ const bufferCopy = Buffer.from(bufferFromStr);
JavaScript
๋ณต์‚ฌ

Buffer.toString()

const buffer = Buffer.from('Hello, Buffer!', 'utf8'); // ๋ฒ„ํผ๋ฅผ ๋ฌธ์ž์—ด๋กœ ๋ณ€ํ™˜ const bufferToString = buffer.toString('utf8'); console.log(bufferToString); // 'Hello, Buffer!'
JavaScript
๋ณต์‚ฌ

Buffer.concat()

const buffer1 = Buffer.from('Hello, '); const buffer2 = Buffer.from('Buffer!'); const concatenatedBuffer = Buffer.concat([buffer1, buffer2]); console.log(concatenatedBuffer.toString()); // 'Hello, Buffer!'
JavaScript
๋ณต์‚ฌ

Buffer.alloc()

// 10๋ฐ”์ดํŠธ ํฌ๊ธฐ์˜ ์ดˆ๊ธฐํ™”๋œ ๋ฒ„ํผ ์ƒ์„ฑ const initializedBuffer = Buffer.alloc(10); // 10๋ฐ”์ดํŠธ ํฌ๊ธฐ์˜ ๋ฏธ๋ฆฌ ์ง€์ •๋œ ๊ฐ’์œผ๋กœ ์ดˆ๊ธฐํ™”๋œ ๋ฒ„ํผ ์ƒ์„ฑ const filledBuffer = Buffer.alloc(10, 1); // ๊ฐ ๋ฐ”์ดํŠธ์—๋Š” 1์ด ์ฑ„์›Œ์ง
JavaScript
๋ณต์‚ฌ

์ŠคํŠธ๋ฆผ (Stream)

์ •์˜

Node.js์˜ Stream ๋ชจ๋“ˆ์€ ๋ฐ์ดํ„ฐ์˜ ํ๋ฆ„์„ ์ฒ˜๋ฆฌํ•˜๋Š”๋ฐ ์‚ฌ์šฉ๋˜๋Š” ๋ชจ๋“ˆ๋กœ, ๋Œ€์šฉ๋Ÿ‰์˜ ๋ฐ์ดํ„ฐ๋ฅผ ํšจ์œจ์ ์œผ๋กœ ์ฒ˜๋ฆฌํ•˜๊ธฐ ์œ„ํ•œ API๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์ŠคํŠธ๋ฆผ์€ ๋ฐ์ดํ„ฐ๋ฅผ ์ž‘์€ ์กฐ๊ฐ์œผ๋กœ ๋‚˜๋ˆ„์–ด ์ฒ˜๋ฆฌํ•˜๋ฏ€๋กœ ๋ฉ”๋ชจ๋ฆฌ ์‚ฌ์šฉ์ด ํšจ์œจ์ ์ด๋ฉฐ, ๋„คํŠธ์›Œํฌ๋‚˜ ํŒŒ์ผ๊ณผ ๊ฐ™์€ ์ž…์ถœ๋ ฅ ์ž‘์—…์— ํŠนํžˆ ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค

๋ฌธ๋ฒ•

์ŠคํŠธ๋ฆผ์€ stream ๋ชจ๋“ˆ์„ ํ†ตํ•ด ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
const stream = require('stream');
JavaScript
๋ณต์‚ฌ

์ฃผ์š” ์†์„ฑ ๋ฐ ๋ฉ”์†Œ๋“œ

Readable Stream (์ฝ๊ธฐ ์ŠคํŠธ๋ฆผ)
์†์„ฑ ๋˜๋Š” ๋ฉ”์†Œ๋“œ
์„ค๋ช…
data
์ด๋ฒคํŠธ ํ•ธ๋“ค๋Ÿฌ, ๋ฐ์ดํ„ฐ๊ฐ€ ๋„์ฐฉํ•  ๋•Œ ๋ฐœ์ƒํ•˜๋Š” ์ด๋ฒคํŠธ.
end
์ด๋ฒคํŠธ ํ•ธ๋“ค๋Ÿฌ, ์ŠคํŠธ๋ฆผ์˜ ๋์— ๋„๋‹ฌํ•  ๋•Œ ๋ฐœ์ƒํ•˜๋Š” ์ด๋ฒคํŠธ.
read(size)
์ŠคํŠธ๋ฆผ์—์„œ ์ง€์ •๋œ ํฌ๊ธฐ๋งŒํผ ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ์Šต๋‹ˆ๋‹ค.
Writable Stream (์“ฐ๊ธฐ ์ŠคํŠธ๋ฆผ)
์†์„ฑ ๋˜๋Š” ๋ฉ”์†Œ๋“œ
์„ค๋ช…
write(chunk, encoding, callback)
์ŠคํŠธ๋ฆผ์— ๋ฐ์ดํ„ฐ๋ฅผ ์”๋‹ˆ๋‹ค.
end([chunk, encoding, callback])
์ŠคํŠธ๋ฆผ์˜ ๋์„ ๋‚˜ํƒ€๋‚ด๋ฉฐ, ๋ฐ์ดํ„ฐ๋ฅผ ์“ฐ๊ณ  ์ŠคํŠธ๋ฆผ์„ ์ข…๋ฃŒํ•ฉ๋‹ˆ๋‹ค.
Duplex Stream (์–‘๋ฐฉํ–ฅ ์ŠคํŠธ๋ฆผ):
Readable๊ณผ Writable์„ ๊ฒฐํ•ฉํ•œ ์ŠคํŠธ๋ฆผ.

์˜ˆ์‹œ์ฝ”๋“œ

const { Readable, Writable } = require('stream'); // Readable Stream ์˜ˆ์ œ const readableStream = new Readable({ read(size) { this.push('Hello, '); this.push('world!'); this.push(null); // ๋” ์ด์ƒ ๋ฐ์ดํ„ฐ๊ฐ€ ์—†์Œ์„ ์•Œ๋ฆผ } }); // Writable Stream ์˜ˆ์ œ const writableStream = new Writable({ write(chunk, encoding, callback) { console.log(chunk.toString()); callback(); } }); readableStream.pipe(writableStream); // Readable ์ŠคํŠธ๋ฆผ์—์„œ ๋ฐ์ดํ„ฐ๋ฅผ Writable ์ŠคํŠธ๋ฆผ์œผ๋กœ ์ „์†ก
JavaScript
๋ณต์‚ฌ

์‚ฌ์šฉ ๋ชฉ์ 

โ€ข
๋Œ€์šฉ๋Ÿ‰ ๋ฐ์ดํ„ฐ ์ฒ˜๋ฆฌ: ํŒŒ์ผ์ด๋‚˜ ๋„คํŠธ์›Œํฌ์—์„œ ๋ฐ์ดํ„ฐ๋ฅผ ํšจ์œจ์ ์œผ๋กœ ์ฒ˜๋ฆฌํ•  ๋•Œ ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค.
โ€ข
์‹ค์‹œ๊ฐ„ ๋ฐ์ดํ„ฐ ์ „์†ก: ์‹ค์‹œ๊ฐ„์œผ๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ์ƒ์„ฑํ•˜๊ณ  ๋‹ค๋ฅธ ์‹œ์Šคํ…œ์— ์ „์†กํ•  ๋•Œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
โ€ข
๋น„๋™๊ธฐ์ ์œผ๋กœ ๋ฐ์ดํ„ฐ ์ฒ˜๋ฆฌ: ์ŠคํŠธ๋ฆผ์€ ๋น„๋™๊ธฐ์ ์œผ๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ์ฒ˜๋ฆฌํ•˜๋ฏ€๋กœ ์ž‘์—…์„ ์ค‘๋‹จํ•˜์ง€ ์•Š๊ณ  ๊ณ„์† ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ๊ฑฐ๋‚˜ ์“ธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.