Write the path in the current binary stream.

@param array $path An array of integer values representing flow positions.
557639
public function writePath(array $path) {
        try {
            $this->writeShort(count($path));
            foreach ($path as $p) {
                $this->writeShort($p);
            }
        } catch (BinaryStreamAccessException $e) {
            $msg = "An error occured while writing the path.";
    		throw new QtiBinaryStreamAccessException($msg, $this, QtiBinaryStreamAccessException::PATH, $e);
        }
    }
861711
public function setPath($path)
    {
        $this->parts = Path::translatePath($this->outer->getProject(), $path);
    }
780006
public static function untrailingslash(&$path) {
		if (\is_array($path)) {
			foreach ($path as $k=>$v) {
				static::untrailingslash($path[$k]);
			}
		}
		else {
			cast::string($path, true);

			static::unixslash($path);
			$path = \rtrim($path, '/');
		}
	}
1131603
public static function setClassIndexMap($path)
    {
        if (is_array($path)) {
            self::$resultClassIndexMap = $path;
        } elseif (file_exists($path) && is_readable($path)) {
            self::$resultClassIndexMap = require_once($path);
        } else {
            throw new RuntimeException("Path $path does not exists or is not readable.");
        }
    }
614815
public function openPath(array $path)
    {
        $context = $this->getPageTreeElement();
        foreach ($path as $pageName) {
            $context = $this->ensureTreeNodeIsOpen($pageName, $context);
        }
        $context->findElement(\WebDriverBy::cssSelector(self::$treeItemAnchorSelector))->click();
    }
802289
public function after_path($path) {
        // Have finished one grouped path, dispatch it
        if ($this->path_is_grouped($path)) {
            // Any accumulated information must be in
            // currentdata, properly built
            $data = $this->currentdata[$path];
            unset($this->currentdata[$path]);
            // Always, before dispatching any chunk, send all pending start notifications.
            $this->process_pending_startend_notifications($path, 'start');
            // TODO: If running under DEBUG_DEVELOPER notice about >1MB grouped chunks
            // And, finally, dispatch it.
            $this->dispatch_chunk($data);
        }
        // Normal notification of path end
        // Only if path is selected and not child of grouped
        if (!$this->grouped_parent_exists($path)) {
            parent::after_path($path);
        }
    }
173208
protected function walk(array $array, $path = '') {
			foreach ($array as $k => $v)
				if (!is_array($v) || !(bool)count(array_filter(array_keys($v), 'is_string')))
					$this->data[$path . $k] = $v;
				else
					$this->walk($v, $path . $k . '.');
		}
148085
public function addPath($path)
    {
        if (!is_string($path)) {
            throw new Exception\InvalidArgumentException(sprintf(
                'Invalid path provided; must be a string, received %s',
                gettype($path)
            ));
        }

        $this->paths[] = $this->normalizePath($path);
    }
326481
protected function setPath($path)
    {
        if ($path !== '' && !$this->isValidPath($path)) {
            throw new \InvalidArgumentException("Invalid path '$path'");
        }
        
        $this->path = (string)$path;
    }
1007742
public function setPath(string $path) : void
    {
        if (!is_writable($path)) {
            throw new Exception("The path to the cache is not writable.");
        }

        $this->cachePath = $path;
    }
227390
public function setPath(string $path)
    {
        $info = pathinfo($path);

        $this->setLocation($info["dirname"] ?? "");
        $this->setName($info["filename"] ?? "");
    }
623474
protected function setSourcePath($path)
    {
        if ($this->sourcePath === self::DUMMY_PATH) {
            $this->sourcePath = $path;
        } elseif ($this->sourcePath === self::EMPTY_PATH) {
            $this->sourcePath = null;
        }
    }
998947
public function setBasePath($path)
    {
        $this->basePath = $path;

        array_unshift($this->paths, $this->basePath);
    }
146691
protected function writeFile($path)
    {
        $handle = fopen($path, Stream::MODE_READ_WRITE_RESET);

        if ($handle === false) {
            throw new \RuntimeException('Unable to write to path: ' . $path);
        }

        $this->stream->rewind();

        while (!$this->stream->eof()) {
            fwrite($handle, $this->stream->read(4096));
        }

        fclose($handle);
    }
437027
public function addPaths(array $paths)
    {
        $this->currentCollectorData = $this->filePathCollector->collect();

        foreach ($paths as $path) {
            $this->addPath($path);
        }
    }
1080072
public function setPath(?string $path) : void
    {
        if (strpos($path, "/") !== 0) {
            $path = "/" . $path;
        }
        $this->path = $path;
    }
375953
private function setPath($path)
    {
        $parts = pathinfo($path);

        $this->info['path'] = [];

        if (isset($parts['dirname'])) {
            foreach (explode('/', str_replace(DIRECTORY_SEPARATOR, '/', $parts['dirname'])) as $dir) {
                if ($dir !== '') {
                    $this->info['path'][] = $dir;
                }
            }
        }

        $this->info['file'] = isset($parts['filename']) ? $parts['filename'] : null;
        $this->info['extension'] = isset($parts['extension']) ? $parts['extension'] : null;
    }