Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func NewWriter ¶
NewWriter will create a new local writer. - 'pth' is the full path (with filename) that will be written. If the final file extension is a supported compression format then the file will be compressed in that format. - 'append' indicates whether the write session will append the contents to an existing file or truncate and then write. The default is false which will truncate an existing file and then write. - 'lazy' set to 'true' will tell the writer to do a lazy write. This means that all write calls will write to memory first and then write to 'pth' when writing is complete with a final call to 'Close'. If Close is never called then the file will not be written.
When initializing a new writer, pth is checked for the correct write permissions. An error is returned if the writer will not have the correct permissions.
For lazy writing, the writer supports writing to memory or a temp file. The writer will use the temp file option if tmpDir and/or tmpPrefix is provided. The writer will remove a temp file with a call to Close.