/** * Devuelve `True` si `$filename` se puede leer. Esta funci('o)n utiliza * la variable `INLCUDE_PATH`, cuando la funci('o) de PHP no. * * @param string $filename * @return boolean */ public static function isReadable($filename) { if (Aix_System_Path::real($filename)) { return true; } return false; }
/** * Devuelve la ruta can('o)nica y absoluta. Esta funci('o)n busca en la * variable `INCLUDE_PATH`, cuando la funci('o) de PHP no. * * @param string $path * @return string */ public static function real($path) { if ($real = realpath($path)) { return $real; } foreach (Aix_System::path() as $include) { if ($include == '.') { if ($real = realpath($path)) { return $real; } continue; } $file = Aix_System_Path::join($include, $path); if ($real = realpath($file)) { return $real; } } return false; }