file

package
v1.11.9 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package file handles common file system operations such as move, copy and dir.

Index

Constants

View Source
const (
	CreateMode = 0o666
)

Variables

View Source
var (
	ErrSameArgs = errors.New("name and dest cannot be the same")
	ErrWriter   = errors.New("writer must be a file object")
)

Functions

func Add

func Add(tw *tar.Writer, src string) error

Add a file to the tar writer.

func Copy

func Copy(name, dest string) (int64, error)

Copy copies a file to the destination.

func Dir

func Dir(w io.Writer, name string) error

Dir writes the content of a directory to the writer.

func Move

func Move(name, dest string) (int64, error)

Move copies a file to the destination and then deletes the source.

Types

This section is empty.

Jump to

Keyboard shortcuts

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