def dir_to_uri(directory, sep=os.path.sep):
    items = directory.split(sep)
    path = '/'.join(items)
    if path.startswith('/'):
        path = path[1:]
    return 'file:///%s' % (path,)
Convert a local path to a File URI.
dataset/ETHPy150Open RDFLib/rdflib/test/test_swap_n3.py/dir_to_uri