You are here

public function FileSystemBase::path in Forena Reports 8

Return the full path to the filename

Parameters

$filename:

Return value

string Fully qualified fiel name.

3 calls to FileSystemBase::path()
FileSystemBase::contents in src/File/FileSystemBase.php
Return the contents of a file located in the report directory
FileSystemBase::exists in src/File/FileSystemBase.php
Return whether the file exists.
FileSystemBase::pathinfo in src/File/FileSystemBase.php
Retrieve path info

File

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

Class

FileSystemBase

Namespace

Drupal\forena\File

Code

public function path($filename, $use_include = TRUE) {
  $path = $this->dir . '/' . $filename;
  if ($use_include && !file_exists($path)) {
    foreach ($this->includes as $dir) {
      if (file_exists($dir . '/' . $filename)) {
        $path = $dir . '/' . $filename;
      }
    }
  }
  return $path;
}