FOSSredder 0.5.0
Loading...
Searching...
No Matches
FileSystemBrowser.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#include <QObject>
9#include <QString>
10#include <QVariant>
11
12namespace ui {
13
17class FileSystemBrowser : public QObject {
18 Q_OBJECT
19public:
21 explicit FileSystemBrowser(QObject* parent = nullptr);
22
27 Q_INVOKABLE QVariantList listDir(const QString& path) const;
28
32 Q_INVOKABLE QString appDir() const;
33
39 Q_INVOKABLE bool openLocation(const QString& path) const;
40};
41
42} // namespace ui
Q_INVOKABLE QVariantList listDir(const QString &path) const
List the contents of a directory in a QML-friendly payload shape.
Q_INVOKABLE bool openLocation(const QString &path) const
Opens the containing folder for a file or directory path.
Q_INVOKABLE QString appDir() const
Return the current application directory path.
FileSystemBrowser(QObject *parent=nullptr)
Create the filesystem helper exposed to QML.