def _get_relative_path(file, rel):
    """Get the path of a file relative to to rel.
    
    For example, if rel is the bazel-bin/foo/tsconfig.json and 'file'
    is bazel-bin/foo/a/b/c.ts, return 'a/b/c.ts'
    """
    
    return file.path[len(rel.dirname) + 1:]