async function add ({href, title, pinned}) {
  href = normalizeUrl(href)
  var drive = filesystem.get()

  let existing = await get(href)
  if (existing) {
    if (typeof title === 'undefined') title = existing.title
    if (typeof pinned === 'undefined') pinned = existing.pinned

    let urlp = new URL(existing.bookmarkUrl)
    await drive.pda.updateMetadata(urlp.pathname, {href, title})
    if (pinned !== existing.pinned) {
      if (pinned) await pinsAPI.add(href)
      else await pinsAPI.remove(href)
    }
    return
  }

  // new bookmark
  var slug = createResourceSlug(href, title)
  var filename = await filesystem.getAvailableName('/bookmarks', slug, 'goto', drive) // avoid collisions
  var path = joinPath('/bookmarks', filename)
  await filesystem.ensureDir('/bookmarks', drive)
  await drive.pda.writeFile(path, '', {metadata: {href, title}})
  if (pinned) await pinsAPI.add(href)
  return path
}
@param {Object} bookmark
@param {string} bookmark.href
@param {string} bookmark.title
@param {Boolean} bookmark.pinned
@returns {Promise<string>}