Ignore:
File:
1 edited

Legend:

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

    raccdf882 r2309891  
    349349                goto error;
    350350        }
     351
     352        ui_file_list_clear_entries(flist);
    351353
    352354        if (str_cmp(ndir, "/") != 0) {
     
    422424}
    423425
     426/** Return path to the current directory.
     427 *
     428 * @return Path to current directory or @c NULL if out of memory
     429 */
     430char *ui_file_list_get_dir(ui_file_list_t *flist)
     431{
     432        return str_dup(flist->dir);
     433}
     434
     435/** Re-read file list from directory.
     436 *
     437 * @param flist File list
     438 * @return EOK on success or an error code
     439 */
     440errno_t ui_file_list_refresh(ui_file_list_t *flist)
     441{
     442        errno_t rc;
     443        ui_list_pos_t pos;
     444
     445        ui_list_save_pos(flist->list, &pos);
     446        rc = ui_file_list_read_dir(flist, flist->dir);
     447        if (rc != EOK)
     448                return rc;
     449        ui_list_restore_pos(flist->list, &pos);
     450        return EOK;
     451}
     452
    424453/** Sort file list entries.
    425454 *
     
    593622                return ENOMEM;
    594623
    595         ui_file_list_clear_entries(flist);
    596 
    597624        rc = ui_file_list_read_dir(flist, dirname);
    598625        if (rc != EOK) {
Note: See TracChangeset for help on using the changeset viewer.