/** * Returns nicely formated directory path. * * @param string Initial path * @return string Path, without trailing slash */ private function makePath($path) { $path = FileSystem::adjustTrailingSlash($path); if (strlen($path) == 0) { $path = "."; } if (!preg_match("/(^\.|\/)/", $path)) { $path = "./".$path; } return $path; }
public function __construct($path = CacheServer::DEFAULT_DIR) { $this->path = FileSystem::adjustTrailingSlash($path, true); }
public function __construct($path = null) { if ($path == null) { $path = Config::get('base.file_cache.default_dir'); } $this->path = FileSystem::adjustTrailingSlash($path, true); }