Returns the path of an existing GeoIP database or false if none can be found.

@param array $possibleFileNames The list of possible file names for the GeoIP database.
@return string|false
770765
public static function getPathToGeoIpDatabase($possibleFileNames)
    {
        foreach ($possibleFileNames as $filename) {
            $path = self::getPathForGeoIpDatabase($filename);
            if (file_exists($path)) {
                return $path;
            }
        }
        return false;
    }
1366409
public function getLocalFilePath($filename, $route, &$isTempFile, $includeStoragePath = false)
  {
    $isTempFile = false;

    if($this->Config->get('filesystems.default') == 'gcs')
    {
      $isTempFile = true;

      $this->Storage->disk('local')->put('//temp/' . $filename, $this->Storage->read($route));

      $route = 'temp/' . $filename;
    }

    if($includeStoragePath)
    {
      return storage_path('app') . '/' . $route;
    }

    return $route;
  }
374505
public function findFirst($glob, $not_exists = false)
    {
        $files = $this->find($glob, $not_exists);
        return $files->first();
    }
743211
public function getFilepath($include_filename = false)
    {
        $filepath = $this->filepath;
        if ($include_filename) {
            $filepath .= FileManager::DS . $this->getFilename();
        }

        return $filepath;
    }
488041
public function computePath($params) {
    $route = $this->getPath();

    if (!preg_match_all(
      '~' . self::VARIABLE_REGEX . '~x', $route, $matches,
      PREG_OFFSET_CAPTURE | PREG_SET_ORDER
    )) {
      return $route;
    }

    $offset = 0;
    $url = '';

    /** @var string[] $matches */
    foreach ($matches as $set) {
      if ($set[0][1] > $offset) {
        $url .= substr($route, $offset, $set[0][1] - $offset);
      }
      if(isset($params[$set[1][0]])) {
        $url .= $params[$set[1][0]];
      } else {
        throw new \InvalidArgumentException(sprintf('No value supplied for "%s"', $set[1][0]));
      }
      $offset = $set[0][1] + strlen($set[0][0]);
    }
    if ($offset !== strlen($route)) {
      $url .= substr($route, $offset);
    }

    return $url;
  }
1365944
public function getPath()
    {
        $path = $this->getArgument('path');

        // If path is absolute return it without modifications.
        if (
            strpos($path, 'http://') !== false
            || strpos($path, 'https://') !== false
            || substr($path, 0, 2) === '//'
        ) {
            return $path;
        }

        $filePath = $this->config->get('app.directory').DIRECTORY_SEPARATOR."public/{$path}";
        $fileUrl = $this->config->get('app.path').DIRECTORY_SEPARATOR."public/{$path}";

        if ($this->filesystem->exists($filePath)) {
            return $fileUrl;
        }

        throw new FileNotFoundException("File does not exist at path {$path}");
    }
96043
protected function getPropertyFilepaths()
    {
        $file = $this->basename.'.properties';

        if($this->MessageService->fileExists($file))
            return $this->MessageService->resolveFile($file)->getLocalPath();

        return null;
    }
1221737
protected static function calculateResourcePathname($filenamePath, $source)
    {
        $sourceFile = preg_replace("/'/", "", $source[1]);
        if (preg_match('/\#/', $sourceFile)) {
            $sourceFile = explode("#", $sourceFile);
            $sourceFile = $sourceFile[0];
        }
        if (preg_match('/\?/', $sourceFile)) {
            $sourceFile = explode("?", $sourceFile);
            $sourceFile = $sourceFile[0];
        }
        $orig = realpath(dirname($filenamePath) . DIRECTORY_SEPARATOR . $sourceFile);
        return $orig;
    }
803270
protected function getExistsPath($path)
    {
        $fullPath = $this->concatPaths($path);

        if (!file_exists($fullPath)) {
            $fullPath = $this->getExistsPath(pathinfo($fullPath, PATHINFO_DIRNAME));
        }

        return $fullPath;
    }
168213
private static function extractPathname($path, $domains)
    {
        $filenamePath = $path;
        if (!empty($domains) && !file_exists($path)) {
            foreach ($domains as $domain => $paths) {
                $domainFilename = str_replace($domain, $paths['public'], $path);
                if (file_exists($domainFilename)) {
                    $filenamePath = $domainFilename;
                    continue;
                }
            }

        }

        return $filenamePath;
    }
682781
public static function getGeoIPDatabaseTypeFromFilename($filename)
    {
        foreach (self::$dbNames as $key => $names) {
            foreach ($names as $name) {
                if ($name === $filename) {
                    return $key;
                }
            }
        }
        return false;
    }
1092580
public function getFilePath($name, $extension = '.php')
    {
        $filename = trim(dotToPath($name), '/') . $extension;
        $file = null;
        foreach ($this->paths as $dir) {
            $realName = nPath($dir, $filename);
            if (file_exists($realName)) {
                $file = $realName;
                break;
            }
        }
        return $file;
    }
1274472
private String getFileName(String possiblyPathName) {
        possiblyPathName = possiblyPathName.substring(possiblyPathName.lastIndexOf('/')+1);
        possiblyPathName = possiblyPathName.substring(possiblyPathName.lastIndexOf('\\')+1);
        return possiblyPathName;
    }
1073313
public function getPath()
	{
		$realpath	= realpath( $this->fileName );
		$path	= dirname( $realpath );
		$path	= str_replace( "\\", "/", $path );
		$path	.= "/";
		return	$path;
	}
949181
public static function file_exists($pFilename)
    {
        // Sick construction, but it seems that
        // file_exists returns strange values when
        // doing the original file_exists on ZIP archives...
        if (strtolower(substr($pFilename, 0, 3)) == 'zip') {
            // Open ZIP file and verify if the file exists
            $zipFile     = substr($pFilename, 6, strpos($pFilename, '#') - 6);
            $archiveFile = substr($pFilename, strpos($pFilename, '#') + 1);

            $zip = new ZipArchive();
            if ($zip->open($zipFile) === true) {
                $returnValue = ($zip->getFromName($archiveFile) !== false);
                $zip->close();
                return $returnValue;
            } else {
                return false;
            }
        } else {
            // Regular file_exists
            return file_exists($pFilename);
        }
    }
412646
public function getFilepathsFromRecord($wpData) {
		if (isset($wpData['guid'])) {
			// NOTE(Jake): Attempts to access cache to avoid function call overhead.
			$files = ($this->_runtime_cache !== null) ? $this->_runtime_cache : $this->getFilesRecursive();
			$basename = basename($wpData['guid']);
			if (isset($files[$basename])) {
				return $files[$basename];
			}
			return false;
		}
		return null;
	}
402117
public static function realpath($pFilename) {
		// Returnvalue
		$returnValue = '';

		// Try using realpath()
		$returnValue = realpath($pFilename);

		// Found something?
		if ($returnValue == '' || is_null($returnValue)) {
			$pathArray = split('/' , $pFilename);
			while(in_array('..', $pathArray) && $pathArray[0] != '..') {
				for ($i = 0; $i < count($pathArray); ++$i) {
					if ($pathArray[$i] == '..' && $i > 0) {
						unset($pathArray[$i]);
						unset($pathArray[$i - 1]);
						break;
					}
				}
			}
			$returnValue = implode('/', $pathArray);
		}

		// Return
		return $returnValue;
	}