Emulate setting filepath in a file input.

@param string $path file path
7988
public function setFile($path)
    {
        $this->con->executeStep(
            sprintf('_sahi._setFile(%s, %s)', $this->getAccessor(), json_encode($path))
        );
    }
173199
public function setPath($path)
    {
        if ($this->path) {
            $this->old_paths[] = $this->path;
        }
        $this->path = $path;

        return $this;
    }
266556
public function setPath(string $path): void
    {
        if (!file_exists($path) || !is_dir($path)) {
            throw new InvalidArgumentException(
                'Expected the template path to be an existing directory, received: ' . $path
            );
        }

        $this->path = $path;
    }
1356468
public function setBasePath($path)
    {
        foreach ($this->loaders as $loader) {
            if ($loader instanceof FileLoaderInterface) {
                $loader->setBasePath($path);
            }
        }
    }
263320
public function setPath($path)
    {
        $uri = $this->guzzleRequest->getUri()->withPath($path);
        $this->guzzleRequest = new Request($this->guzzleRequest->getMethod(), $uri);
    }
1068061
public function setPath($path)
    {
        if (is_string($path)) {
            $array = explode('/', $path);
        } else if (is_array($path)) {
            $array = $path;
            $path = implode('/', $path);
        }

        return $this
            ->setDot('path.string', $path)
            ->setDot('path.array', $array);
    }
824238
public function setDefaultPath($path = null)
    {
        if ((null !== $path) && (false === is_dir($path))) {
            throw new InvalidArgumentException(sprintf(
                'The path "%s" is not a directory path or does not exist.',
                $path
            ));
        }

        $this->path = $path;
    }
115404
public function setPath($path)
    {
        if (is_writable($path)) {
            $file = fopen($path, 'a+');
            fseek($file, -1, SEEK_END);
            if (fread($file, 1) != "\n") {
                fwrite($file, PHP_EOL);
            }
            fclose($file);
        }

        // should parse message incrementally from file
        $this->resource = mailparse_msg_parse_file($path);
        $this->stream = fopen($path, 'r');
        $this->parse();

        return $this;
    }
623474
protected function setSourcePath($path)
    {
        if ($this->sourcePath === self::DUMMY_PATH) {
            $this->sourcePath = $path;
        } elseif ($this->sourcePath === self::EMPTY_PATH) {
            $this->sourcePath = null;
        }
    }
925251
public function setPath($path)
    {
        $this->path = $path;
        $fileFullPath = "{$this->rootPath}/{$this->path}";
        // readable ?
        if (file_exists($fileFullPath)) {
            $this->file = $fileFullPath;
            return $this;
        }
        // absolute path ?
        if (file_exists($path) && strpos($path, $this->rootPath) === 0) {
            $this->file = $path;
            $this->rootPath = '/';
        } else {
            error_log("[BEAR.Ace] 404: {$fileFullPath}");
            throw new Exception('Not found ' . $fileFullPath, 404);
        }

        return $this;
    }
944175
public function setRuntimePath($path)
    {
        $this->_runtimePath = $this->getAlias($path);
        $this->setAlias('@runtime', $this->_runtimePath);
    }
1194479
public function setPath($path)
    {
        if (!is_string($path)) {
            $path = $this->app->url($path);
        }
        $this->path = $path.'#';

        return $this;
    }
68524
public function setCachePath(string $path)
    {
        $rpath = substr($path, 0, 6) === "vfs://" ? $path : realpath($path);
        if (empty($rpath) || !file_exists($path))
            throw new InvalidArgumentException("Path does not exist: " . $rpath);
        $this->cache_path = $rpath;
    }
590763
public function setPath($path)
    {
        $parts = explode(DS, $path);
        $filename = array_pop($parts);

        // with format.
        if (preg_match('/^(.+?)\.(.+)$/', $filename, $matches)) {
            $filename = $matches[1];
            $format = $matches[2];
            $parts[] = $filename;
            $this->path = join(DS, $parts);
            $this->setParam('format', $format);

        // no format
        } else {
            $this->path = $path;
        }
    }
178954
protected function setFilePath($filePath)
	{
		if ( ! is_string($filePath))
		{
			throw new \InvalidArgumentException('File path must be a string type.');
		}
		
		if (preg_match('~^(\w+:)?//~', $filePath) || is_link($filePath))
		{
			throw new \InvalidArgumentException('File path must be a local path.');
		}
		
		$filePath = realpath($filePath);
		
		if ( ! is_file($filePath))
		{
			throw new TranscoderException('File path not found.');
		}
		
		$this->filePath = $filePath;
		
		return $this;
	}
1184246
public function setResourcePath($path)
    {
        $escapedPath = rtrim($path, '/');
        if (!file_exists($escapedPath)) {
            throw new Exception(sprintf(
                "The path '%s' to resources' folder does not exist!",
                $escapedPath
            ));
        }

        $this->resourcePath = $escapedPath;
    }
1237955
public function setStoragePath($path) {
		$dir  = pathinfo($path, PATHINFO_DIRNAME);
		$name = pathinfo($path, PATHINFO_BASENAME);
		
		$dir = realpath($dir);
		
		if ($dir === false) {
			throw new Exceptions\MetadataError('Invalid path: "' . $path . '"');
		}
		
		$this->metadataPath = $dir . DIRECTORY_SEPARATOR . $name;
	}