Make path

@param $path
@return bool
495990
protected function makePath($path)
    {
        // Log
        $this->info("Attempting to make path: {$path}");

        // Make
        if (!is_dir($path)) {
            if (mkdir($path) === false) {
                $this->error("Error in making path: {$path}");
                return false;
            }
        }

        // Make writable
        if (!is_writable($path)) {
            if (chmod($path, 0777) === false) {
                $this->error("Error in making path writable: {$path}");
                return false;
            }
        }

        return true;
    }
244366
public function makeFolder($path)
    {
        $path = self::validatePath($path);
        $fullPath = $this->getMediaPath($path);

        return $this->getStorageDisk()->makeDirectory($fullPath);
    }
639454
public static function removePath($path)
    {
        $result = false;

        $path = realpath($path);
        if ($path) {
            self::remove($path);
            $result = true;
        }

        return $result;
    }
1179972
protected function makeDirectory($path)
    {
        if (!is_dir(dirname($path))) {
            mkdir(dirname($path), 0777, true);
        }

        return $path;
    }
254212
protected function makeUrl($path)
    {
        return URL::to(str_replace('{'.$this->config['html']['href'].'}', $path, $this->customUrl));
    }
1333361
private function relativizePaths($path)
    {
        if (!$this->basePath) {
            return $path;
        }

        return str_replace($this->basePath . DIRECTORY_SEPARATOR, '', $path);
    }
339691
private function createPathIfNeeded($path)
	{
		return  !(!\is_dir($path) && !@\mkdir($path, 0777 & (~$this->umask), true) && !\is_dir($path));
	}
472218
public function setPath($path)
	{
		if($path !== false)
			$path = trim($path, '/');

		$this->setProperty('path', $path);

		return $this;
	}
816436
public static function createFolder($path)
    {
        if (!file_exists($path)) {
            self::createFolder(dirname($path));
            mkdir($path, 0777);
        }
    }
825428
public function realpath($path)
    {
        $path = str_replace('/', DS, trim($path));
        if (strpos($path, '..') === false) {
            if (!Folder::isAbsolute($path)) {
                $path = Folder::addPathElement($this->path, $path);
            }

            return $path;
        }
        $parts = explode(DS, $path);
        $newparts = array();
        $newpath = '';
        if ($path[0] === DS) {
            $newpath = DS;
        }

        while (($part = array_shift($parts)) !== null) {
            if ($part === '.' || $part === '') {
                continue;
            }
            if ($part === '..') {
                if (!empty($newparts)) {
                    array_pop($newparts);
                    continue;
                }

                return false;
            }
            $newparts[] = $part;
        }
        $newpath .= implode(DS, $newparts);

        return Folder::slashTerm($newpath);
    }
1025990
public function makeUrl($path) {
		if ($path{0} == '/') $path = substr($path, 1);
		$dsn = explode('/', $path, 2);
		$size = count($dsn);
		
		$controller = $dsn[0];
		$action = '';
		if ($size > 0) {
			$action = $dsn[1];
		}
		
		$param_array = array();
		if ($size > 1) {
			for ($i = 2; $i <= $size; $i+=2) {
				$param_array[$names[$size]] = isset($names[$size + 1]) ? $names[$size + 1] : '';
			}
		}
		
		$url = $controller;
		if ($action != '') {
			$url.= '/' . $action;
		}
		
	}
1175931
final protected function makePathAbsolute($path): string
    {
        $baseUrl = rtrim($this->baseUrl, '/') . '/';

        return 0 !== strpos($path, 'http') ? $baseUrl . ltrim($path, '/') : $path;
    }
1001141
public function setPath($path = null) : bool
    {
        if ($path === null) {
            $uri = $this->server->get('REQUEST_URI');

            if (!empty($uri)) {
                $uriParts = explode('?', $uri);
                $this->path = $uriParts[0];

                return true;
            }

            // Default to a slash
            $this->path = '/';

            return true;
        }

        $this->path = $path;

        return true;
    }
971238
public function path($path)
    {
        $path  = strtolower(trim($path));
        $first = substr($path, 0, 1);
        
        if ($first == '@' && isset($this->aliases[$path])) {
            $path = $this->aliases[$path];
            
        } elseif ($first == '/') {
            $path = preg_replace('/\\//', $this->root() . '/', $path, 1);
            
        }
        if ($path = realpath($path)) {
            $path = static::clean($path);
        }
        
        return $path;
    }
210494
protected function makeDir($path)
    {
        if (! file_exists(dirname($path))) {
            $this->makeDir(dirname($path));
        }

        if (! file_exists($path)) {
            mkdir($path);
        }
    }
985166
public function changePath($path)
    {
        $pathname = $this->createPathname($path, $this->getBasename(), $this->getExtension());

        return new static($pathname);
    }
588107
public function make($path)
    {
        $absolutePath = $this->buildAbsolutePath($path);

        $relativePath = $this->buildRelativePath($absolutePath);

        $asset = new Asset($this->files, $this->factory, $this->appEnvironment, $absolutePath, $relativePath);

        return $asset->setOrder($this->nextAssetOrder());
    }