Yes, Directive 2004/38/EC, the directive passed in 2004 to consolidate freedom of movement legislation, contains a number of provisions which allow restrictions to be placed on this right.
Particularly, Chapter VI, Article 27, states:
- Subject to the provisions of this Chapter, Member States may restrict the freedom of movement and residence of Union citizens and
their family members, irrespective of nationality, on grounds of
public policy, public security or public health. These grounds shall
not be invoked to serve economic ends.
Article 29 states:
1. The only diseases justifying measures restricting freedom of movement shall be the diseases with epidemic potential as defined by
the relevant instruments of the World Health Organisation and other
infectious diseases or contagious parasitic diseases if they are the
subject of protection provisions applying to nationals of the host
As Covid-19 qualifies by this criterion, France, or any EU member, can restrict EU citizens' freedom of movement by closing the border to freight.
It's worth bearing in mind that until the end of the Brexit transition period, UK citizens still enjoy the same freedom of movement rights as EU citizens. Note also that unmanned freight is not being blocked; according to Boris Johnson's press release on December 21st; the current restriction is purely a freedom of movement issue and not an explicit restriction on trade:
And it is vital first to stress that these delays – which are only
occurring at Dover – only affect human-handled freight, and that is
only 20 per cent of the total arriving from or departing to the