X-Git-Url: http://git.datanom.net/omvzfs.git/blobdiff_plain/b987242837d2b8a451862e89c9ca842c07b354b8..946a8c30ebe271713f4d16830546bc37e64ef301:/src/Dataset.php diff --git a/src/Dataset.php b/src/Dataset.php index 8560f74..e161141 100644 --- a/src/Dataset.php +++ b/src/Dataset.php @@ -1,6 +1,7 @@ exec($cmd, $out, $res); + foreach ($out as $line) { + if (preg_match('/^(' . $qname . '[^\s]+)\t.*$/', $line, $res)) { + $this->snapshots[] = new OMVModuleZFSSnapshot($res[1]); + } + } } /** @@ -80,6 +97,16 @@ class OMVModuleZFSDataset { 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 *