code: def parse_file_path(filepath):
      # type: (pathlib.Path) -> Tuple[str, str, str]
      
      if not isinstance(filepath, pathlib.Path):
          filepath = pathlib.Path(filepath)
      dirname = '/'.join(filepath.parts[:len(filepath.parts) - 1])
      if len(dirname) == 0:
          dirname = None
      if len(filepath.parts) > 0:
          fname = filepath.parts[-1]
      else:
          fname = None
      fname, snapshot = blobxfer.util.parse_fileshare_or_file_snapshot_parameter(
          fname)
      return (dirname, fname, snapshot)
docs: Parse file path from file path
      :param str filepath: file path
      :rtype: tuple
      :return: (dirname, rest of path, snapshot)