Jump to main content

##

# 1.2.7.4.31 SYS_FS_DirectoryChange Function

## C

    SYS_FS_RESULT SYS_FS_DirectoryChange
    (
        const char* path
    );

## Summary

Changes to a the directory specified.

## Description

This function changes the present directory to a new directory.

## Precondition

The disk has to be mounted and the directory to be changed must exist.

## Parameters

Param | Description
--- | ---
path | Path of the directory to be changed to.

## Returns

SYS_FS_RES_SUCCESS - Indicates that the directory change operation was successful.

SYS_FS_RES_FAILURE - Indicates that the directory change operation was unsuccessful. The reason for the failure can be retrieved with SYS_FS_Error.

## Example

    SYS_FS_RESULT res;

    res = SYS_FS_DirectoryChange("Dir1");

    if(res == SYS_FS_RES_FAILURE)
    {
        // Directory change failed
    }

## Remarks

None.