type File struct {
*os.File// contains filtered or unexported fields
}
File is a wrapper around an os.File instance that uses a temporary file for writes
that is renamed to its final path when Close is called. The Close method will also
ensure that all data from the file has been fsynced as well as the containing
directory. If the temporary file cannot be renamed or fsynced on Close, it is
removed.
Create creates a new file at a temporary path that will be renamed to the
supplied path on close from a temporary file in the same directory, ensuring
all data and the containing directory have been fsynced to disk.