X-Git-Url: http://git.datanom.net/omvzfs.git/blobdiff_plain/6ed033a41e7a9d60352c818bc753ade3fc463fc9..ff78c9eb1a79585ec8a78c4bc4c9c3e8eecf9f78:/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 *