def get_protocol(path):
    """Given a path, returns the protocol the path uses

    For example,
      's3://a/b/c/'  returns 's3'
      'http://a/b/c' returns 'http'
      'tmp/a/bc/'    returns ''

    """
    pos = path.find('://')
    if pos < 0:
        return ''
    return path[0:pos].lower()
