code: public function cd(array $path): void
      {
          array_unshift($path, $this->path);
          $this->path = new Path($path);
      }
docs: changes current directory
  @param string[]|FileSystem[]|Path[] $path
  @return void