46 lines
1 KiB
C++
46 lines
1 KiB
C++
#ifndef FILESYSTEM_H
|
|
#define FILESYSTEM_H
|
|
|
|
#include <QDir>
|
|
#include <QObject>
|
|
//#include <QtAndroidExtras>
|
|
|
|
class FILESYSTEM : public QObject
|
|
{
|
|
Q_OBJECT
|
|
Q_PROPERTY(QString Directory READ Directory WRITE setDirectory NOTIFY directoryChanged)
|
|
//Q_PROPERTY(bool direxist READ direxist)
|
|
Q_PROPERTY(QString homePath READ homePath)
|
|
//Q_PROPERTY(QString cameraPath READ cameraPath)
|
|
|
|
|
|
public:
|
|
static FILESYSTEM *instance();
|
|
explicit FILESYSTEM(QObject *parent = 0);
|
|
void setDirectory(QString Directory);
|
|
QString Directory() const;
|
|
QFileInfoList fileList();
|
|
//bool direxist(QString Directory);
|
|
QString homePath() const;
|
|
QString cameraPath() const;
|
|
|
|
signals:
|
|
void directoryChanged();
|
|
//void fileListContent(QList data);
|
|
void success(QString data);
|
|
void error(QString data, int code);
|
|
|
|
public slots:
|
|
void makeDir(QString name);
|
|
void rmDir();
|
|
void rmFile(QString name);
|
|
//void fileList();
|
|
|
|
private:
|
|
QString m_Directory;
|
|
QString homeDir;
|
|
//QList m_Filelist;
|
|
};
|
|
|
|
#endif // FILSYSTEM_H
|