/* Read the next filename form a directory. The name of the directories will begin with '/'  */
static lv_fs_res_t fs_dir_read(lv_fs_drv_t *drv, void *rddir_p, char *fn)
/* Read the next filename form a directory. The name of the directories will begin with '/'  */
static lv_fs_res_t fs_dir_read(lv_fs_drv_t *drv, void *rddir_p, char *fn)
{
    FRESULT res;
    FILINFO fno;
    fn[0] = '\0';
    do {
        res = f_readdir(rddir_p, &fno);
        if(res != FR_OK) return LV_FS_RES_UNKNOWN;
        if(fno.fattrib & AM_DIR) {
            fn[0] = '/';
            strcpy(&fn[1], fno.fname);
        } else
            strcpy(fn, fno.fname);
    } while(strcmp(fn, "/.") == 0 || strcmp(fn, "/..") == 0);
    return LV_FS_RES_OK;
}