Make the `File` class behave backwards compatbile (see #5307)