whole_func_string: function getExistingExtensions(filePath) {
      const basename = path.basename(filePath, path.extname(filePath))
      try {
          return fs
              .readdirSync(path.dirname(filePath))
              .filter(
                  filename =>
                      path.basename(filename, path.extname(filename)) === basename
              )
              .map(filename => path.extname(filename))
      } catch (_error) {
          return []
      }
  }
func_code_string: function getExistingExtensions(filePath) {
      const basename = path.basename(filePath, path.extname(filePath))
      try {
          return fs
              .readdirSync(path.dirname(filePath))
              .filter(
                  filename =>
                      path.basename(filename, path.extname(filename)) === basename
              )
              .map(filename => path.extname(filename))
      } catch (_error) {
          return []
      }
  }
func_documentation_string: Get all file extensions of the files which have the same basename.
  @param {string} filePath The path to the original file to check.
  @returns {string[]} File extensions.