fn create_or_truncate_file_with_dirs<P: AsRef<Path>>(path: P) -> Result<File>
Create or truncate a file at the given path, creating any missing parent directories.