Efficiently creates a file of a specified size.