<?php
require_once("Exception.php");
require_once("openmediavault/util.inc");
+require_once("Snapshot.php");
/**
* XXX detailed description
*/
private $properties;
+ /**
+ * Array with Snapshots associated to the Dataset
+ *
+ * @var array $snapshots
+ * @access private
+ */
+ private $snapshots;
+
// Associations
// Operations
continue;
}
}
+ $qname = preg_quote($name . "@", '/');
+ $cmd = "zfs list -H -t snapshot";
+ $this->exec($cmd, $out, $res);
+ foreach ($out as $line) {
+ if (preg_match('/^(' . $qname . '[^\s]+)\t.*$/', $line, $res)) {
+ $this->snapshots[] = new OMVModuleZFSSnapshot($res[1]);
+ }
+ }
}
/**
return $this->mountPoint;
}
+ /**
+ * Get all Snapshots associated with the Dataset
+ *
+ * @return array $snapshots
+ * @access public
+ */
+ public function getSnapshots() {
+ return $this->snapshots;
+ }
+
/**
* Get a single property value associated with the Dataset
*