async def METHOD_NAME():
    # This feature is tested in core, we're just testing if
    # sync in different types work.
    base = dagger.directory().with_new_file("foo", "bar")
    # short cirtcut
    with pytest.raises(dagger.QueryError, match="no such file or directory"):
        await base.directory("foobar").sync()
    # chaining
    entries = await (await base.sync()).entries()
    assert entries == ["foo"]