code: def _retrieveFileSelection_gui(self):
      curVal = self.param.value()
      if isinstance(curVal, list) and len(curVal):
          # All files should be from the same directory, in principle
          # Since no mechanism exists for preselecting multiple, the most sensible
          # thing is to select nothing in the preview dialog
          curVal = curVal[0]
          if os.path.isfile(curVal):
              curVal = os.path.dirname(curVal)
      opts = self.param.opts.copy()
      useDir = curVal or opts.get("directory") or os.getcwd()
      startDir = os.path.abspath(useDir)
      if os.path.isfile(startDir):
          opts["selectFile"] = os.path.basename(startDir)
          startDir = os.path.dirname(startDir)
      if os.path.exists(startDir):
          opts["directory"] = startDir
      if opts.get("windowTitle") is None:
          opts["windowTitle"] = self.param.title()
  
      fname = popupFilePicker(None, **opts)
      if not fname:
          return
      self.param.setValue(fname)
  
file_path: pyqtgraph/pyqtgraph/parametertree/parameterTypes/file.py
imports: import os
  import re
  from ...Qt import QtCore, QtGui, QtWidgets
  from ..Parameter import Parameter
  from .str import StrParameterItem
label_desc: Use image node_id 6 for calling the FileParameterItem obj's underlying member method code with example usage: obj._retrieveFileSelection_gui() without return types