You are here

public function FileBase::isWritable in Forena Reports 8

Same name and namespace in other branches
  1. 7.5 src/File/FileBase.php \Drupal\forena\File\FileBase::isWritable()

Return an indicator as to whether the file is savable. New files can be saved if the directory is writabel.

Parameters

unknown $filename:

Return value

boolean

File

src/File/FileBaseOld.php, line 405
FileSystemBase.inc File toolbox for manipulating files contained tn the report directory.

Class

FileBase

Namespace

Drupal\forena\File

Code

public function isWritable($filename) {
  return is_writeable($this->dir . "/{$filename}") || !file_exists($this->dir . "/{$filename}");
}