AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
helpers.c File Reference

Generic answers, for regular files, to whether a read is at the end of the file. More...

#include <fs/posix.h>

Go to the source code of this file.

Functions

int posix_file_eof (struct file *file)
 Says whether a file's offset is at or past its end, so that a read returns nothing.

Detailed Description

Generic answers, for regular files, to whether a read is at the end of the file.

(Whether a read or a write of a regular file can go on is always yes: vfs_file_can_read() and vfs_file_can_write() say so themselves.)

Definition in file helpers.c.

Function Documentation

◆ posix_file_eof()

int posix_file_eof ( struct file * file)

Says whether a file's offset is at or past its end, so that a read returns nothing.

Parameters
filethe open file
Returns
whether the offset is at the end

Definition at line 17 of file helpers.c.

References file::offset, and posix_file_eof().

Referenced by posix_file_eof().