file

package
v1.51.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package file provides helper methods for file operations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFileNoOverwrite

func CopyFileNoOverwrite(logger *zap.Logger, pathIn, pathOut string) error

CopyFileNoOverwrite copies the file from pathIn to pathOut, preserving the input file's mode. If the output file already exists, this function returns an error.

func CopyFileOverwrite

func CopyFileOverwrite(logger *zap.Logger, pathIn, pathOut string) error

CopyFileOverwrite copies the file from pathIn to pathOut. The output file is created if it does not exist. If the output file does exist, it is removed, then written from the input file, preserving the output file's mode.

func CopyFileRollback

func CopyFileRollback(logger *zap.Logger, pathIn, pathOut string) error

CopyFileRollback copies the file to the file from pathIn to pathOut, preserving the input file's mode if possible Used to perform a rollback

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL