I think I got it !
see this page...
edit after @false comment, here a sketch of encapsulating code:
set_file_size(Path, Size) :-
setup_call_cleanup(
open(Path, update, S),
( stream_property(S, reposition(true)),
% stream_property(S, position(Q)),
% set_stream_position(S, Q),
seek(S, Size, bof, Size),
set_end_of_stream(S)
),
close(S)).
This works, but relies on seek/4 builtin. I can't fully determine the status of such call WRT ISO compliance. It's listed under ISO IO, but untagged as compliant...
Those 2 commented lines served to me to inspect the opaque term position/1. There is a stream_position_data to inquiry the values.