original_string: public function path($value = false, $overwrite = false)
      {
          if ($value === false) {
              return $this->path;
          }
  
          $oldPath = $this->path;
  
          if (!$overwrite && $this->adapter->fileExists($value)) {
              throw new FilesystemException("Cannot rename the file '{$this->path}' to '{$value}' because a file already exists");
          }
  
          (new static($value, $this->adapter))->remove();
  
          if (! $this->adapter->rename($this->path, $value)) {
              throw new FilesystemException("Cannot rename the file '{$this->path}' to '{$value}'");
          }
  
          $this->path = $value;
          $this->fs = null;
          $this->pathChanged($oldPath);
  
          return $this;
      }
code: public function path($value = false, $overwrite = false)
      {
          if ($value === false) {
              return $this->path;
          }
  
          $oldPath = $this->path;
  
          if (!$overwrite && $this->adapter->fileExists($value)) {
              throw new FilesystemException("Cannot rename the file '{$this->path}' to '{$value}' because a file already exists");
          }
  
          (new static($value, $this->adapter))->remove();
  
          if (! $this->adapter->rename($this->path, $value)) {
              throw new FilesystemException("Cannot rename the file '{$this->path}' to '{$value}'");
          }
  
          $this->path = $value;
          $this->fs = null;
          $this->pathChanged($oldPath);
  
          return $this;
      }
code_tokens: public function path ( $ value = false , $ overwrite = false ) { if ( $ value === false ) { return $ this -> path ; } $ oldPath = $ this -> path ; if ( ! $ overwrite && $ this -> adapter -> fileExists ( $ value ) ) { throw new FilesystemException ( "Cannot rename the file '{$this->path}' to '{$value}' because a file already exists" ) ; } ( new static ( $ value , $ this -> adapter ) ) -> remove ( ) ; if ( ! $ this -> adapter -> rename ( $ this -> path , $ value ) ) { throw new FilesystemException ( "Cannot rename the file '{$this->path}' to '{$value}'" ) ; } $ this -> path = $ value ; $ this -> fs = null ; $ this -> pathChanged ( $ oldPath ) ; return $ this ; }
docstring: Gets or Sets the path.
  
  @param  string $value
  @param  boolean $overwrite
  @return string|Tarsana\Filesystem\AbstractFile
  
  @throws Tarsana\Filesystem\Exceptions\FilesystemException if could not rename the file.
docstring_tokens: Gets or Sets the path .