ff_stdio.h
int ff_chdir( const char *pcDirectoryName );
更改嵌入式 FAT 文件系统中的当前工作目录。
参数:
pcDirectoryName
|
指向以 null 结尾的标准 C 字符串的指针,该字符串包含
当前工作目录
的名称。 该字符串可包含相对路径。
|
返回:
如果当前工作目录已更改成功,则返回零。
如果当前工作目录无法更改,则返回 -1,并
可设置任务的 errno以指示原因。 任务
可使用 stdioGET_errno
API 函数获取其 errno 值。
用法示例:
void vExampleFunction( void )
{
ff_mkdir( "subfolder" );
ff_mkdir( "subfolder/sub1" );
ff_chdir( "subfolder/sub1" );
ff_chdir( "../.." );
}
Example use of the ff_chdir() API function to open or create a file
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.