]>
git.datanom.net - omvzfs.git/blob - src/Dataset.php
2 require_once("Exception.php");
5 * XXX detailed description
11 class OMVModuleZFSDataset
{
30 * Mountpoint of the Dataset
32 * @var string $mountPoint
38 * List of features assigned to the Dataset
40 * @var array $features
51 * @param string $name Name of the new Dataset
52 * @param array $features An array of features to set when creating the Dataset
55 public function __construct($name, array $features = null) {
57 if (isset($features)) {
58 $cmd .= "-o " . implode(",", $features) . " ";
60 $cmd .= $name . " 2>&1";
63 throw new OMVModuleZFSException(implode("\n", $out));
67 if (isset($features)) {
68 $this->features
= $features;
69 foreach ($features as $feature) {
70 if (preg_match('/^mountpoint\=(.*)$/', $feature, $res)) {
71 $this->mountPoint
= $res[1];
76 $this->features
= array();
77 $this->mountPoint
= "/" . $name;
82 * Return name of the Dataset
84 * @return string $name
87 public function getName() {
92 * Get the size of the Dataset
97 public function getSize() {
103 * Get the mountpoint of the Dataset
105 * @return string $mountPoint
108 public function getMountPoint() {
109 return $this->mountPoint
;
113 * Get an array of features associated with the Dataset
115 * @return array $features
118 public function getFeatures() {
119 return $this->features
;
129 public function setFeatures($list) {
130 trigger_error('Not Implemented!', E_USER_WARNING
);
This page took 0.151516 seconds and 6 git commands to generate.