본문 바로가기

Programming/MFC

CFile Class

출처 : http://jogook21.tistory.com/entry/CFile-Class


CFile::modeRead 읽기모드
CFile::modeWrite 쓰기모드
CFile::modeCreate | CFILE::modeWrite 파일 생성후 쓰기
CFile::modeNoTruncate 파일 존재시 생성하지 않음
CFile::modeReadWrite 읽고 쓰기모드
CFile::typeBinary 바이너리타입
CFile::typeText 텍스트타입

CFile::modeCreate | CFile::modeReadWrite 기존파일 삭제 후 생성
CFile::modeReadWrite | CFile::modeNotruncate 기존파일 보존 후 읽고 쓰기

멤버함수

의미

CFile()
Abort()
Duplicate()
Open()
Close() 
 
Read()
Write()
Flush() 
 
Seek()
SeekToBegin()
SeekToEnd()
GetLength()
SetLength()
 
LockRange()
UnlockRange()
 
GetPosition()
GetStatus()
GetFileName()
GetFileTitle()
GetFilePath()
SetFilePath()
 
Rename()
Remove()
GetStatus()
SetStatus() 

객체 생성자. 모든 경고와 에러들을 무시하고 화일을 닫는다. 오브젝트 복사. 파일을 연다. 파일 종료 및 오브젝트 삭제.   파일로 부터 데이타를 읽는다. 현재파일 위치에 데이타를 쓴다. 데이타를 제거한다.       파일포인터를 이동한다. 파일 포인터를 처음으로 이동한다. 파일 포인터를 끝으로 이동한다. 파일의 길이를 얻는다. 파일의 길이를 지정한다.    파일의 일부를 락(Lock)을 건다. 파일의 일부를 락에서 해제한다.   파일의 포인터를 얻는다. 지정된 파일의 상태를 얻는다. 선택된 파일의 파일이름을 얻는다. 선택된 파일의 타이틀을 얻는다. 선택된 파일의 전체 경로를 얻는다. 선택된 파일의 전체 경로를 설정한다.     지정된 파일을 다른이름으로 변경한다. 지정된 파일을 제거한다. 지정된 파일의 상태를 얻는다. 지정된 파일의 상태를 설정한다.

 




출처: http://jogook21.tistory.com/entry/CFile-Class [배상영블로그]