fsutil

package
v0.0.0-...-d046166 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package fsutil implements common file operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src, dst string) error

CopyFile copies the regular file at path src to dst. dst is atomically replaced if it already exists and inherits src's mode. Ownership will also be preserved if the EUID is 0.

func MoveFile

func MoveFile(src, dst string) error

MoveFile moves the file at src to dst. The source and destination paths may be on different filesystems. The mode will be preserved, and ownership will also be preserved if possible (i.e. if called with an EUID of 0 or if moving the file within a filesystem).

Types

This section is empty.

Jump to

Keyboard shortcuts

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