Jump to main content

##

# 1.2.7.4.24 SYS_FS_FileTestError Function

## C

    bool SYS_FS_FileTestError
    (
        SYS_FS_HANDLE handle
    );

## Summary

Checks for errors in the file.

## Description

This function checks whether or not file has any errors.

## Precondition

A valid file handle must be obtained before passing to the function

## Parameters

Param | Description
--- | ---
handle | file handle obtained during file Open.

## Returns

On success returns false indicating that the file has no errors. On failure returns true. The reason for the failure can be retrieved with SYS_FS_Error or SYS_FS_FileError.

## Example

    SYS_FS_HANDLE fileHandle;
    bool err;

    fileHandle = SYS_FS_FileOpen("/mnt/myDrive/FILE.JPG", (SYS_FS_FILE_OPEN_READ));

    if(fileHandle != SYS_FS_HANDLE_INVALID)
    {
        // File open is successful
    }
    ...
    ...

    err = SYS_FS_FileTestError(fileHandle);

    if(err == true)
    {
        // either file has error, or there
        // was an error in working with the "SYS_FS_FileTestError" function
    }

## Remarks

None.