def GetPathBeforeFinalDir(url):
  sep = url.delim
  if url.IsFileUrl():
    past_scheme = url.url_string[len('file://'):]
    if past_scheme.find(sep) == -1:
      return 'file://'
    else:
      return 'file://%s' % past_scheme.rstrip(sep).rpartition(sep)[0]
  if url.IsBucket():
    return '%s://' % url.scheme
  # Else it names a bucket subdir.
  return url.url_string.rstrip(sep).rpartition(sep)[0]
Verifies that the specified cron job is present for the specified user.
dataset/ETHPy150Open GoogleCloudPlatform/gsutil/gslib/copy_helper.py/GetPathBeforeFinalDir--crossover with--dataset/ETHPy150Open saltstack/salt/salt/states/cron.py/present