create current or given path

@param string $path path which should be create

@return File
488613
public function mkdir(string $path = ""): File {
		if (!empty($path)) {
			$dir = new File(Paths::appendPath($this->getUrl(), $path));
			$dir->mkdir();

			return $dir;
		} else {
			if (!$this->isDirectory() && !$this->isFile()) {
				$this->manager->createDir($this->getUrl());
			}

			return $this;
		}
	}
1260846
public function createFolder($path)
    {
        $pathinfo = pathinfo($path);

        $parentDir = ($pathinfo['dirname'] != '.') ? $pathinfo['dirname'] : '';
        $url = self::BASE_URI.$this->getFolderUrl($parentDir).'children';

        $folder = new Folder();
        $folder->name = $pathinfo['basename'];

        return $this->getResponse('POST', $url, json_encode($folder), ['Content-Type' => 'application/json']);
    }
713841
public function createDirectory(string $path): Directory {
    $localDirectory = $this->instantiateDir($path);
    $localDirectory->create();
    return $localDirectory;
  }
523074
public function fileModified($path)
    {
        try {
            return Carbon::createFromTimestamp($this->disk->lastModified($path));
        } catch (\Exception $e) {
            return Carbon::now();
        }
    }
370075
public function getFile($path)
    {
        $file = new File($this->getFileSystemId(), $this->getFullPath($path));
        $file->setServiceLocator($this->getServiceLocator());
        return $file;
    }
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());
    }
1315086
protected function createImage($path)
    {
        $path = sprintf('%s/../Resources/images/%s', __DIR__, $path);
        $file = $this->container->get('enhavo_media.factory.file')->createFromPath($path);
        return $this->container->get('enhavo_media.media.media_manager')->saveFile($file);
    }
774172
public static function fromUnWritableFile($path)
    {
        if (! file_exists(dirname($path))) {
            return new self(
                sprintf('Invalid path provided, the path "%s" does not seem to have a parent directory', $path)
            );
        }

        if (is_dir($path)) {
            return new self(
                sprintf('The provided path "%s" is a directory, and it cannot be written as a file', $path)
            );
        }

        return new self(sprintf('The provided path "%s" is invalid', $path));
    }
159362
public function path($path)
    {
        $path = trim($path);

        if (str_empty($this->fileName)) {
            $this->fileName(basename($path));
        }

        if (str_empty($this->fileType)) {
            $this->fileType(mime_content_type($path));
        }

        $this->fileContent(fopen($path, 'r'));

        return $this;
    }
260653
public function makeDirectory($path)
    {
        if ('.' === $path || empty($path)) {
            $path = $this->localPath;
        } else {
            $path = "{$this->localPath}/{$path}";
        }

        return $this->filesystem->createDir($path);
    }
644839
protected function makePath($path)
    {
        return $this->context->directory ? $this->context->directory.'/'.$path : $path;
    }
661472
public static function Init($path = '')
	{
		if( !is_null(self::$_Instance) )
		{
			// TODO error
		}

		self::$_Instance = new static($path);

		return self::$_Instance;
	}
729366
public function withPath(string $path): self
    {
        $newConstraints = $this->constraints;
        $newConstraints[self::CONSTRAINT_PATH] = $path;
        return new static($newConstraints);
    }
510588
public function save($path = null)
    {
        if (is_null($path)) {
            $path = $this->file;
        }
        imagejpeg($this->image, $path);
        return $this;
    }
180127
public function makeDirectory($path)
    {
        if ($this->files->isDirectory($path) === false) {
            $this->files->makeDirectory($path, 0777, true, true);
        }

        return $this;
    }
904734
public static function create_from_path($path) {
		$e = DNEnvironment::create();
		$e->Filename = $path;
		$e->Name = basename($e->Filename, '.rb');

		// add each administrator member as a deployer of the new environment
		$adminGroup = Group::get()->filter('Code', 'administrators')->first();
		$e->DeployerGroups()->add($adminGroup);
		return $e;
	}
402932
public static function get($path)
    {
        if (is_dir($path)) {
            return new filesystem\Directory($path);
        }
        return new filesystem\File($path);
    }