Changeset f9c4c433 in mainline for uspace/lib/ui/src/filelist.c


Ignore:
Timestamp:
2025-09-16T13:02:37Z (5 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
283bb9f
Parents:
113fb4f
Message:

Create new file in Navigator (WIP)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/src/filelist.c

    r113fb4f rf9c4c433  
    349349                goto error;
    350350        }
     351
     352        ui_file_list_clear_entries(flist);
    351353
    352354        if (str_cmp(ndir, "/") != 0) {
     
    422424}
    423425
     426/** Re-read file list from directory.
     427 *
     428 * @param flist File list
     429 * @return EOK on success or an error code
     430 */
     431errno_t ui_file_list_refresh(ui_file_list_t *flist)
     432{
     433        errno_t rc;
     434        ui_list_pos_t pos;
     435
     436        ui_list_save_pos(flist->list, &pos);
     437        rc = ui_file_list_read_dir(flist, flist->dir);
     438        if (rc != EOK)
     439                return rc;
     440        ui_list_restore_pos(flist->list, &pos);
     441        return EOK;
     442}
     443
    424444/** Sort file list entries.
    425445 *
     
    593613                return ENOMEM;
    594614
    595         ui_file_list_clear_entries(flist);
    596 
    597615        rc = ui_file_list_read_dir(flist, dirname);
    598616        if (rc != EOK) {
Note: See TracChangeset for help on using the changeset viewer.