You are here

public function FileBase::includeExists in Forena Reports 8

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

Determine if the file exists in the include path.

Parameters

$file:

Return value

bool TRUE indicates that baseline version of the report exists.

1 call to FileBase::includeExists()
FileBase::revert in src/File/FileBaseOld.php
Revert an individual report

File

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

Class

FileBase

Namespace

Drupal\forena\File

Code

public function includeExists($file) {
  $found = false;
  $i = 0;
  while (isset($this->includes[$i]) && !$found) {
    $filename = $this->includes[$i] . '/' . $file;
    if (file_exists($this->includes[$i] . '/' . $file)) {
      $found = TRUE;
    }
    $i++;
  }
  return $found;
}