if( access( fname, F_OK ) == 0 ){ 
// file exists 
} 
else{ 
// file doesn't exist 
} 
F_OK 파일 존재여부 
R_OK 파일 read 퍼미션 여부 
W_OK 파일 write 퍼미션 여부 
X_OK 파일 execute 퍼미션 여부
'programming/C_C++'에 해당되는 글 286건
- 2022.02.22 파일 EXIST 체크 access
if( access( fname, F_OK ) == 0 ){ 
// file exists 
} 
else{ 
// file doesn't exist 
} 
F_OK 파일 존재여부 
R_OK 파일 read 퍼미션 여부 
W_OK 파일 write 퍼미션 여부 
X_OK 파일 execute 퍼미션 여부