New returns a WriteCloser so that writing to it writes to a
temporary file and closing it atomically changes the temporary file to
destination path. Writing and closing concurrently is not allowed.
NOTE: umask is not considered for the file's permissions.
WriteFile atomically writes data to a file named by filename and with the specified permission bits.
NOTE: umask is not considered for the file's permissions.
NewWriteSet creates a new atomic write set to
atomically create a set of files. The given directory
is used as the base directory for storing files before
commit. If no temporary directory is given the system
default is used.