RADLib
RADical C++ application framework
RADUi::DirectoryBrowserModel Class Reference

Backend-neutral expandable directory browser model. More...

#include <RADUi.h>

Static Public Member Functions

static std::filesystem::path stablePath (const std::filesystem::path &path)
 Returns a stable absolute path when possible. More...
 
static bool extensionAllowed (const std::filesystem::path &path, const DirectoryBrowserOptions &options)
 Returns true when extension matches options.allowedExtensions, or the list is empty. More...
 
static DirectoryBrowserEntryKind classify (const std::filesystem::directory_entry &entry)
 Classifies a filesystem entry for display and behavior. More...
 
static std::string iconForKind (DirectoryBrowserEntryKind kind)
 Returns the toolkit-neutral icon key for kind. More...
 
static std::vector< DirectoryBrowserEntrysnapshot (const std::filesystem::path &root, const std::set< std::filesystem::path > &expandedDirectories, const DirectoryBrowserOptions &options={})
 Builds a flattened tree snapshot from root and expanded directory paths. More...
 

Detailed Description

Backend-neutral expandable directory browser model.

Member Function Documentation

◆ classify()

static DirectoryBrowserEntryKind RADUi::DirectoryBrowserModel::classify ( const std::filesystem::directory_entry &  entry)
static

Classifies a filesystem entry for display and behavior.

◆ extensionAllowed()

static bool RADUi::DirectoryBrowserModel::extensionAllowed ( const std::filesystem::path &  path,
const DirectoryBrowserOptions options 
)
static

Returns true when extension matches options.allowedExtensions, or the list is empty.

◆ iconForKind()

static std::string RADUi::DirectoryBrowserModel::iconForKind ( DirectoryBrowserEntryKind  kind)
static

Returns the toolkit-neutral icon key for kind.

◆ snapshot()

static std::vector<DirectoryBrowserEntry> RADUi::DirectoryBrowserModel::snapshot ( const std::filesystem::path &  root,
const std::set< std::filesystem::path > &  expandedDirectories,
const DirectoryBrowserOptions options = {} 
)
static

Builds a flattened tree snapshot from root and expanded directory paths.

◆ stablePath()

static std::filesystem::path RADUi::DirectoryBrowserModel::stablePath ( const std::filesystem::path &  path)
static

Returns a stable absolute path when possible.


The documentation for this class was generated from the following file: