파일 수정 시간1 [Linux, C++] 파일 소유자, 파일 크기, 접근/수정 시간 등 파일 정보 보는 방법 ○ 헤더 및 함수 #include #include #include int stat(const char *pathname, struct stat *statbuf); int fstat(int fd, struct stat *statbuf); int lstat(const char *pathname, struct stat *statbuf); - 리턴 값 0 : 성공 -1 : 에러 On success, zero is returned. On error, -1 is returned, and errno is set appropriately. ○ stat 구조체 설명 struct stat { dev_t st_dev; /* ID of device containing file */ ino_t st_ino; /* Inode n.. 2021. 5. 15. 이전 1 다음 반응형