Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 프로그래머스
- Visual Studio
- Python
- pytorch
- label
- error
- SSH
- 기타 연주
- C
- pandas
- C++
- pip
- paramiko
- Linux
- ubuntu
- YOLO
- JSON
- 오류
- windows forms
- LIST
- C#
- VS Code
- OpenCV
- 채보
- Selenium
- mysql
- Docker
- Numpy
- 핑거스타일
- 컨테이너
Archives
- Today
- Total
목록File (1)
기계는 거짓말하지 않는다
C 파일 존재 여부, File Exist Check
C언어 파일 존재여부 확인 Linux #include if( access( f_path, F_OK ) != -1 ) { // 파일 존재 } else { // 파일 없음 } stat 구조체 이용 #include bool exist_file (char *file_name) { struct stat buffer; return (stat (file_name, &buffer) == 0); } FILE 구조체 이용 #include FILE *file; if (file = fopen("temp.txt", "r")) { fclose(file); printf("파일 존재\n"); } else { printf("파일 없음\n"); }
C
2022. 5. 13. 17:38