Jarves\Jarves::getCacheDir PHP Method

getCacheDir() public method

public getCacheDir ( ) : string
return string
    public function getCacheDir()
    {
        return $this->cacheDir;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Creates a temp folder and returns its path.
  * Please use TempFile::createFolder() class instead.
  *
  * @param  string $prefix
  * @param  bool $fullPath Returns the full path on true and the relative to the current TempFolder on false.
  *
  * @return string Path with trailing slash
  */
 public function createTempFolder($prefix = '', $fullPath = true)
 {
     $tmp = $this->jarves->getCacheDir();
     do {
         $path = $tmp . $prefix . dechex(time() / mt_rand(100, 500));
     } while (is_dir($path));
     mkdir($path);
     if ('/' !== substr($path, -1)) {
         $path .= '/';
     }
     return $fullPath ? $path : substr($path, strlen($tmp));
 }
All Usage Examples Of Jarves\Jarves::getCacheDir