You are here

public function FileSystemBase::includeExists in Forena Reports 8

Determine if the file exists in the include path.

Parameters

$file:

Return value

bool TRUE indicates that a base file exists on include path.

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

File

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

Class

FileSystemBase

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;
}