You are here

private function FileCache::createPathIfNeeded in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php \Doctrine\Common\Cache\FileCache::createPathIfNeeded()

Create path if needed.

Parameters

string $path:

Return value

bool TRUE on success or if path already exists, FALSE if path cannot be created.

2 calls to FileCache::createPathIfNeeded()
FileCache::writeFile in vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php
Writes a string content to file in an atomic way.
FileCache::__construct in vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php
Constructor.

File

vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php, line 182

Class

FileCache
Base file cache driver.

Namespace

Doctrine\Common\Cache

Code

private function createPathIfNeeded($path) {
  if (!is_dir($path)) {
    if (false === @mkdir($path, 0777 & ~$this->umask, true) && !is_dir($path)) {
      return false;
    }
  }
  return true;
}