FATFS_ff13a


FATFS文件操作系统,版本为ff13a,更新于2017年10月~~~~~~~~~~~~~
资源截图
代码片段和文件信息
/*------------------------------------------------------------/
/ Open or create a file in append mode
/ (This function was sperseded by FA_OPEN_APPEND flag at FatFs R0.12a)
/------------------------------------------------------------*/

FRESULT open_append (
    FIL* fp            /* [OUT] File object to create */
    const char* path    /* [IN]  File name to be opened */

{
    FRESULT fr;

    /* Opens an existing file. If not exist creates a new file. */
    fr = f_open(fp path FA_WRITE | FA_OPEN_ALWAYS);
    if (fr == FR_OK) {
        /* Seek to end of the file to append data */
        fr = f_lseek(fp f_size(fp));
        if (fr != FR_OK)
            f_close(fp);
    }
    return fr;
}


int main (void)
{
    FRESULT fr;
    FATFS fs;
    FIL fil;

    /* Open or create a log file and ready to append */
    f_mount(&fs ““ 0);
    fr = open_append(&fil “logfile.txt“);
    if (fr != FR_OK) return 1;

    /* Append a line */
    f_printf(&fil “%02u/%02u/%u %2u:%02u
“ Mday Mon Year Hour Min);

    /* Close the file */
    f_close(&fil);

    return 0;
}


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件       10275  2017-10-14 14:47  source0history.txt
     文件         916  2017-10-14 14:47  source0readme.txt
     文件        5196  2017-10-14 14:47  sourcediskio.c
     文件        2707  2017-10-14 14:47  sourcediskio.h
     文件      230729  2017-10-14 14:47  sourceff.c
     文件       14172  2017-10-14 14:47  sourceff.h
     文件       11459  2017-10-14 14:47  sourceffconf.h
     文件        5106  2017-10-14 14:47  sourceffsystem.c
     文件     1974849  2017-10-14 14:47  sourceffunicode.c
     文件         853  2017-10-14 14:47  sourceinteger.h
     文件        3665  2017-10-14 14:47  documentscss_e.css
     目录           0  2017-04-28 22:26  documentsdoc
     文件       35376  2017-10-15 16:19  documentsdocappnote.html
     文件        2572  2017-10-14 14:47  documentsdocchdir.html
     文件        2141  2017-10-14 14:47  documentsdocchdrive.html
     文件        3023  2017-10-14 14:47  documentsdocchmod.html
     文件        2148  2017-10-14 14:47  documentsdocclose.html
     文件        2004  2017-10-14 14:47  documentsdocclosedir.html
     文件       17746  2017-10-14 17:54  documentsdocconfig.html
     文件        1817  2017-10-14 14:47  documentsdocdinit.html
     文件        7599  2017-10-14 14:47  documentsdocdioctl.html
     文件        3766  2017-10-14 14:47  documentsdocdread.html
     文件        2273  2017-10-14 14:47  documentsdocdstat.html
     文件        3456  2017-10-14 14:47  documentsdocdwrite.html
     文件        1706  2017-10-14 14:47  documentsdoceof.html
     文件        1595  2017-10-14 14:47  documentsdocerror.html
     文件        5203  2017-10-14 14:47  documentsdocexpand.html
     文件        1724  2017-10-14 14:47  documentsdocfattime.html
     文件        4303  2017-10-14 14:47  documentsdocfdisk.html
     文件        9698  2017-10-14 14:47  documentsdocfilename.html
     文件        5378  2017-10-14 14:47  documentsdocfindfirst.html
............此处省略58个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)