Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File represents safe file descriptor.
func CreateFile ¶
CreateFile creates the named file safely from unique temporary file. The temporary file is renamed to the named file upon successful close to safeguard intermediate state in the named file. The temporary file is created in the name of the named file with suffixed unique number and prefixed "$tmpfile" string. While creating the temporary file, missing parent directories are also created. The temporary file is removed if case of any intermediate failure. Not removed temporary files can be cleaned up by identifying them using "$tmpfile" prefix string.
Click to show internal directories.
Click to hide internal directories.