mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibGUI: Add allowed file extensions to FileSystemModel
This allows FileSystemModel to take an optional list of allowed file extensions which it will use to filter out all files that don't end with that file extension. The file extensions are set via `set_allowed_file_extensions` which has a coresponding `get_allowed_file_extensions`.
This commit is contained in:
committed by
Andrew Kaster
parent
c3bd841d50
commit
fe5dfe4cd5
@@ -146,6 +146,9 @@ public:
|
||||
bool should_show_dotfiles() const { return m_should_show_dotfiles; }
|
||||
void set_should_show_dotfiles(bool);
|
||||
|
||||
Optional<Vector<DeprecatedString>> allowed_file_extensions() const { return m_allowed_file_extensions; }
|
||||
void set_allowed_file_extensions(Optional<Vector<DeprecatedString>> const& allowed_file_extensions);
|
||||
|
||||
private:
|
||||
FileSystemModel(DeprecatedString root_path, Mode);
|
||||
|
||||
@@ -169,6 +172,8 @@ private:
|
||||
unsigned m_thumbnail_progress { 0 };
|
||||
unsigned m_thumbnail_progress_total { 0 };
|
||||
|
||||
Optional<Vector<DeprecatedString>> m_allowed_file_extensions;
|
||||
|
||||
bool m_should_show_dotfiles { false };
|
||||
|
||||
RefPtr<Core::FileWatcher> m_file_watcher;
|
||||
|
||||
Reference in New Issue
Block a user