Documentation ¶
Overview ¶
Package file handles various file operations
Package file handles various file operations
Index ¶
Constants ¶
const ( LOG_PUBLIC_ERRORS = "public_errors.log" LOG_ACCOUNT_ERRORS = "account_errors.log" LOG_SERVER_ERRORS = "server/logs/server_errors.log" LOG_PUBLIC_LOAD = "public_load_time.log" )
Variables ¶
This section is empty.
Functions ¶
func CopyDir ¶
CopyDir recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist. Symlinks are ignored and skipped.
func CopyFile ¶
CopyFile copies the contents of the file named src to the file named by dst. The file will be created if it does not already exist. If the destination file exists, all it's contents will be replaced by the contents of the source file. The file mode will be copied from the source and the copied data is synced/flushed to stable storage.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func Open ¶
Open function attempts to open a file and returns the handler for said file. This function takes a parameter append which if set to false will truncate the file upon writing to it. The log parameter denotes whether or not to look inside of the log folder when attempting to open a given file.
func (*Handler) Close ¶
Close function is attached to the current file and will attempt to close the current file. The boolean parameter delete, if set to true, will also attempt to delete the file upon closing it.