Exemple #1
0
 /**
  * make dotfiles not readable, not writable, hidden and locked
  *
  * @param  string  $attr  attribute name (read|write|locked|hidden)
  * @param  string  $path  file path. Attention! This is path relative to volume root directory started with directory separator.
  * @param  mixed   $data  data which seted in 'accessControlData' elFinder option
  * @param  elFinderVolumeDriver  $volume  volume driver
  * @return bool
  * @author Dmitry (dio) Levashov
  **/
 public function fsAccess($attr, $path, $data, $volume)
 {
     if ($volume->name() == 'localfilesystem') {
         return strpos(basename($path), '.') === 0 ? !($attr == 'read' || $attr == 'write') : $attr == 'read' || $attr == 'write';
     }
     return true;
 }