def iconview_get_dir_items(dir_path, icon_size=48, show_hidden=False): ''' Get children items with given directory path. ''' items = [] for gfile in get_dir_child_files(dir_path, sort_file_by_name, False, show_hidden): if is_directory(gfile): items.append(DirItem(gfile, icon_size)) else: items.append(FileItem(gfile, icon_size)) return items
def get_dir_items(dir_path, column_index=0, show_hidden=False): ''' Get children items with given directory path. ''' items = [] for gfile in get_dir_child_files(dir_path, sort_file_by_name, False, show_hidden): if is_directory(gfile): items.append(DirItem(gfile, column_index)) else: items.append(FileItem(gfile, column_index)) return items
def get_dir_items(dir_path, column_index=0): ''' Get children items with given directory path. ''' items = [] for gfile in get_dir_child_files(dir_path, sort_file_by_name): if is_directory(gfile): items.append(DirItem(gfile, column_index)) else: items.append(FileItem(gfile, column_index)) return items