Menu="Share:1" Title="Share Settings" --- if ($name == "") { /* default values when adding new share */ $share = ["nameOrig" => "", "name" => "", "comment" => "", "allocator" => "highwater", "floor" => "", "splitLevel" => "", "include" => "", "exclude" => "", "useCache" => "no", "cow" => "auto"]; } elseif (array_key_exists($name, $shares)) { /* edit existing share */ $share = $shares[$name]; } else { /* handle share deleted case */ echo "
Share ".htmlspecialchars($name)." has been deleted.
"; return; } /* check for empty share */ function shareEmpty($name) { return (($files = @scandir('/mnt/user/'.$name)) && (count($files) <= 2)); } function globalInclude($name) { global $var; return substr($name,0,4)=='disk' && (!$var['shareUserInclude'] || strpos("{$var['shareUserInclude']},","$name,")!==false); } // global shares include/exclude $disks = array_filter($disks,'my_disks'); $myDisks = array_filter(array_diff(array_keys($disks), explode(',',$var['shareUserExclude'])), 'globalInclude'); ?> > A *Share*, also called a *User Share*, is simply the name of a top-level directory that exists on one or more of your > storage devices (array and cache). Each share can be exported for network access. When browsing a share, we return the > composite view of all files and subdirectories for which that top-level directory exists on each storage device. > > *Read settings from* is used to preset the settings of the new share with the settings of an existing share. > > Select the desired share name and press **Read** to copy the settings from the selected source. > > *Write settings to* is used to copy the settings of the current share to one or more other existing shares. > > Select the desired destinations and press **Write** to copy the settings to the selected shares.