You are here

public function FrxFile::path in Forena Reports 7.4

Same name and namespace in other branches
  1. 7.3 FrxFile.inc \FrxFile::path()

Return the full path to the filename

Parameters

$filename:

3 calls to FrxFile::path()
FrxFile::contents in ./FrxFile.inc
Return the contents of a file located in the report directory
FrxFile::exists in ./FrxFile.inc
Return whether the file exists.
FrxFile::pathinfo in ./FrxFile.inc
Retrieve path info
1 method overrides FrxFile::path()
FrxDataFile::path in ./FrxDataFile.inc
Return the full path to the filename

File

./FrxFile.inc, line 269
FrxFile.inc File toolbox for manipulating files contained tn the report directory.

Class

FrxFile
@file FrxFile.inc File toolbox for manipulating files contained tn the report directory.

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