You are here

public function FileSystemBase::isWritable in Forena Reports 8

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

Parameters

string $filename:

Return value

bool

Overrides FileInterface::isWritable

File

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

Class

FileSystemBase

Namespace

Drupal\forena\File

Code

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