#ifndef _di_f_file_stat_
f_return_status f_file_stat(const f_string file_name, struct stat *file_stat) {
- if (file_stat != 0) {
- return f_none;
- }
-
if (stat(file_name, file_stat) < 0) {
if (errno == ENAMETOOLONG || errno == EFAULT) {
return f_status_set_error(f_invalid_name);
if (file_id <= 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_0_parameter_checking_
- if (file_stat != 0) {
- return f_none;
- }
-
int result = fstatat(file_id, file_name, file_stat, flags);
if (result < 0) {
if (errno == ENAMETOOLONG || errno == EFAULT) {
if (file_id <= 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_0_parameter_checking_
- if (file_stat != 0) {
- return f_none;
- }
-
int result = fstat(file_id, file_stat);
if (result < 0) {
if (errno == ENAMETOOLONG || errno == EFAULT) {
*
* @return
* f_none on success.
- * f_none is returned if file_stat has a non-zero address.
* f_none_on_eof on success and EOF was reached.
* f_file_not_open (with error bit) if file is not open.
* f_file_error_read (with error bit) if file read failed.
*
* @return
* f_none on success.
- * f_none is returned if file_stat has a non-zero address.
* f_none_on_eof on success and EOF was reached.
* f_file_not_open (with error bit) if file is not open.
* f_file_error_seek (with error bit) if file seek failed.
*
* @return
* f_none on success.
- * f_none is returned if file_stat has a non-zero address.
* f_invalid_name (with error bit) if the name is somehow invalid.
* f_out_of_memory (with error bit) if out of memory.
* f_number_overflow (with error bit) on overflow error.