Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김기빈
/
OSS_StarCraft2_Project
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
신기성
2018-12-04 13:44:32 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
444a34af2e164a9e73867718bfd21889c1af94d7
444a34af
1 parent
0ecdfe9f
process line_1 and line_2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
gentxt.js
target.txt
gentxt.js
0 → 100644
View file @
444a34a
var
fs
=
require
(
'fs'
);
//파일 시스템
var
readline
=
require
(
'readline'
)
//readline 모듈
var
file
=
'target.txt'
;
//파일은 타겟.텍스트이다.
var
r
=
readline
.
createInterface
({
input
:
process
.
stdin
,
output
:
process
.
stdout
});
//입출력 정의
fs
.
open
(
file
,
'r+'
,
function
(
err
,
fd
){
//파일을 읽쓰 모드로 열고 없으면 에러발생
if
(
err
)
throw
err
;
console
.
log
(
'target open complete'
);
//열고 출력
r
.
question
(
"검색을 원하는 아이디를 입력하세요 : "
,
function
(
input
){
console
.
log
(
"입력완료"
,
input
);
r
.
close
()
fs
.
writeFile
(
'target.txt'
,
input
,
'utf8'
,
function
(
error
){
console
.
log
(
'writing done'
)
})
})
})
target.txt
0 → 100644
View file @
444a34a
3303221
\ No newline at end of file
Please
register
or
login
to post a comment