FSIsEof

Syntax

#include <cafe/fs.h>

FSStatus FSIsEof(
                FSClient                        *client,
                FSCmdBlock                      *block,
                FSFileHandle                    fileHandle,
                FSRetFlag                       errHandling
                );
FSStatus FSIsEofAsync(
                FSClient                        *client,
                FSCmdBlock                      *block,
                FSFileHandle                    fileHandle,
                FSRetFlag                       errHandling,
                const FSAsyncParams             *asyncParams
                );

Parameters

client Pointer to the client buffer.
block Command block.
fileHandle Handle of the file.
errHandling Auto error handling flag. Only indicated errors are returned.
asyncParams (Async API only) Notification parameters for an asynchronous call.

Return Values

Sync API : Return values / Async API: Callback return values

FS_STATUS_OK Successfully completed.
FS_STATUS_CANCELED The command was canceled.
FS_STATUS_END Current file position is at EOF.
FS_STATUS_MEDIA_NOT_READY (Only for manually mounted devices) Media is not present.
FS_STATUS_MEDIA_ERROR (Only for manually mounted devices) Media is in some inaccessible condition.
FS_STATUS_DATA_CORRUPTED (Only for manually mounted devices) The data is corrupted beyond repair. The volume needs format.

Async API: Immediate return values

FS_STATUS_OK Successfully issued request.
FS_STATUS_FATAL_ERROR The argument is invalid.

Description

Check if the current file position of the file stream designated by fileHandle is at the end of file (EOF). It returns FS_STATUS_END if it is at EOF, or FS_STATUS_OK if not.

Both a sync and async style API are provided. To use the async API, set the user callback and parameters in asyncParams. For more information, see FSAsyncParams.

Do Not Call From

FSIsEof

Thread that displays graphics Do not call this function from a thread that displays graphics. This function may block indefinitely in error cases and the application must be able to display appropriate messages.
Thread that handles system messages Do not call this function from a thread that handles system messages. This function may block indefinitely in error cases and the application must be able to handle system events such as shutdown.
Callbacks Do not call this function from any callback function.
Interrupt handler Do not call this function from any interrupt handler.
Exception handler Do not call this function from any exception handler.

FSIsEofAsync

None.

See Also

File/Directory operations
FSOpenFile
FSReadFile
FSWriteFile
FSGetPosFile
FSSetPosFile
FSGetStatFile
FSCloseFile

Revision History

2014/09/16 Added "Thread that displays graphics" and "Thread that handles system messages" to "Do not call from".
2013/05/23 Added FS_STATUS_DATA_CORRUPTED to return values.
2013/05/20 Added FS_STATUS_MEDIA_NOT_READY to return values.
2013/05/08 Automated cleanup pass.
2012/07/19 Readability and correctness cleanup.
2012/02/20 Initial version.
2010/03/30 Fixed type name FSNotificationParams -> FSAsyncParams.


CONFIDENTIAL