示例#1
0
def relative_path(parent_dir, dest_path):
    # TODO: support adding ".."
    return remove_prefix(parent_dir.rstrip("/") + "/", dest_path)
 def map_pathname(self, pathname):
     return remove_prefix(self._dir_path + "/", pathname)
示例#3
0
def chroot_path(chroot_dir, path):
    return "/" + remove_prefix(chroot_dir.rstrip("/") + "/", path)