Add the `File::resizeTo()` method (see #3883)