Jump to main content

##

# 1.2.7.4.53 SYS_FS_ERROR Enum

## C

    typedef enum
    {
        /* Success */
        SYS_FS_ERROR_OK = 0,
        /* (1) A hard error occurred in the low level disk I/O layer */
        SYS_FS_ERROR_DISK_ERR,
        /* (2) Assertion failed */
        SYS_FS_ERROR_INT_ERR,
        /* (3) The physical drive cannot work */
        SYS_FS_ERROR_NOT_READY,
        /* (4) Could not find the file */
        SYS_FS_ERROR_NO_FILE,
        /* (5) Could not find the path */
        SYS_FS_ERROR_NO_PATH,
        /* (6) The path name format is invalid */
        SYS_FS_ERROR_INVALID_NAME,
        /* (7) Access denied due to prohibited access or directory full */
        SYS_FS_ERROR_DENIED,
        /* (8) Access denied due to prohibited access */
        SYS_FS_ERROR_EXIST,
        /* (9) The file/directory object is invalid */
        SYS_FS_ERROR_INVALID_OBJECT,
        /* (10) The physical drive is write protected */
        SYS_FS_ERROR_WRITE_PROTECTED,
        /* (11) The logical drive number is invalid */
        SYS_FS_ERROR_INVALID_DRIVE,
        /* (12) The volume has no work area */
        SYS_FS_ERROR_NOT_ENABLED,
        /* (13) There is no valid volume */
        SYS_FS_ERROR_NO_FILESYSTEM,
        /* (14) The Format() aborted due to any parameter error */
        SYS_FS_ERROR_FORMAT_ABORTED,
        /* (15) Could not get a grant to access the volume within defined period */
        SYS_FS_ERROR_TIMEOUT,
        /* (16) The operation is rejected according to the file sharing policy */
        SYS_FS_ERROR_LOCKED,
        /* (17) LFN working buffer could not be allocated */
        SYS_FS_ERROR_NOT_ENOUGH_CORE,
        /* (18) Number of open files */
        SYS_FS_ERROR_TOO_MANY_OPEN_FILES,
        /* (19) Given parameter is invalid */
        SYS_FS_ERROR_INVALID_PARAMETER,
        /* (20) Too many mounts requested. Not enough free volume available */
        SYS_FS_ERROR_NOT_ENOUGH_FREE_VOLUME,
        /* (21) Requested native file system is not supported */
        SYS_FS_ERROR_FS_NOT_SUPPORTED,
        /* (22) Requested native file system does not match the format of volume */
        SYS_FS_ERROR_FS_NOT_MATCH_WITH_VOLUME,
        /* (23) Function not supported in native file system layer */
        SYS_FS_ERROR_NOT_SUPPORTED_IN_NATIVE_FS,

        /* Below enumerations constants are generated for littleFS only */

        /* (24) Error during device operation*/
        SYS_FS_ERROR_IO,
        /* (25) Corrupted*/
        SYS_FS_ERROR_CORRUPT,
        /* (26) No directory entry*/
        SYS_FS_ERROR_NOENT,
        /* (27) Entry already exists*/
        SYS_FS_ERROR_ALREADY_EXIST,
        /* (28) Entry is not a dir*/
        SYS_FS_ERROR_NOTDIR,
        /* (29) Entry is a dir*/
        SYS_FS_ERROR_ISDIR,
        /* (30) Dir is not empty*/
        SYS_FS_ERROR_NOTEMPTY,
        /* (31) Bad file number*/
        SYS_FS_ERROR_BADF,
        /* (32) File too large*/
        SYS_FS_ERROR_FBIG,
        /* (33) Invalid parameter*/
        SYS_FS_ERROR_INVAL,
        /* (34) No space left on device*/
        SYS_FS_ERROR_NOSPC,
        /* (35) No more memory available*/
        SYS_FS_ERROR_NOMEM,
        /* (36) No data/attr available*/
        SYS_FS_ERROR_NOATTR,
        /* (37) File name too long*/
        SYS_FS_ERROR_NAMETOOLONG
    } SYS_FS_ERROR;

## Summary

Lists the various error cases.

## Description

This enumeration lists the various error cases. When the application calls for a file system function which has a return type of SYS_FS_RESULT and if the return value is SYS_FS_RES_FAILURE, the application can know the specific reason for failure by calling the SYS_FS_FileError function.

The return value of SYS_FS_FileError function will be one of the enumeration of type SYS_FS_ERROR.

## Remarks

None.