You are here

public function FrxDataFile::path in Forena Reports 7.4

Return the full path to the filename

Parameters

$filename:

Overrides FrxFile::path

File

./FrxDataFile.inc, line 67

Class

FrxDataFile

Code

public function path($filename, $use_include = TRUE) {
  $path = $this->dir . '/' . $filename;
  if ($use_include && !file_exists($path)) {
    foreach ($this->includes as $prefix => $dir) {
      if (strpos($filename, $prefix) === 0) {
        $inc_file = substr($filename, strlen($prefix) + 1);
        if (file_exists($dir . '/' . $inc_file)) {
          $path = $dir . '/' . $inc_file;
        }
      }
    }
  }
  return $path;
}