From 0c4f3e425346da4272f75c0b30e573e653916574 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 23 Apr 2018 08:43:39 -0400 Subject: Add a bunch more ZFS integrations into LFileInfo: 1. ZFS permissions detection and UID check. 2. ZFS create 3. ZFS destroy 4. ZFS snapshot 5. ZFS rollback 6. ZFS clone (not finished yet) --- src-qt5/core/libLumina/LFileInfo.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'src-qt5/core/libLumina/LFileInfo.h') diff --git a/src-qt5/core/libLumina/LFileInfo.h b/src-qt5/core/libLumina/LFileInfo.h index f72c8649..21aae19d 100644 --- a/src-qt5/core/libLumina/LFileInfo.h +++ b/src-qt5/core/libLumina/LFileInfo.h @@ -17,8 +17,9 @@ class LFileInfo : public QFileInfo{ private: - QString mime, zfs_ds; - QStringList iconList; + QString mime, zfs_ds, zfs_dspath; + QStringList iconList, zfs_perms; + int c_uid; XDGDesktop *desk; void loadExtraInfo(); @@ -51,12 +52,26 @@ public: bool isVideo(); //Is a readable video file (for thumbnail support) bool isAVFile(); //Is an audio/video file - bool isZfsDataset(); + //ZFS Information + bool isZfsDataset(QString path = ""); QString zfsPool(); QStringList zfsSnapshots(); //Format: "snapshot name::::path/to/snapshot" QJsonObject zfsProperties(); bool zfsSetProperty(QString property, QString value); + //ZFS Permissions/Modifications + bool canZFScreate(); + bool zfsCreateDataset(QString subdir); + bool canZFSdestroy(); + bool zfsDestroyDataset(QString subdir); + bool zfsDestroySnapshot(QString snapshot); + bool canZFSclone(); + bool zfsCloneDataset(QString subdir, QString newsubdir); + bool canZFSsnapshot(); + bool zfsSnapshot(QString snapname); + bool canZFSrollback(); + bool zfsRollback(QString snapname); + }; typedef QList LFileInfoList; -- cgit