istio: istio.io/istio/pkg/file Index | Files

package file

import "istio.io/istio/pkg/file"

Index

Package Files

file.go

Constants

const (
    // PrivateFileMode grants owner to read/write a file.
    PrivateFileMode = 0600
)

func AtomicCopy Uses

func AtomicCopy(srcFilepath, targetDir, targetFilename string) error

Copies file by reading the file then writing atomically into the target directory

func AtomicWrite Uses

func AtomicWrite(path string, data []byte, mode os.FileMode) (err error)

Write atomically by writing to a temporary file in the same directory then renaming

func Copy Uses

func Copy(srcFilepath, targetDir, targetFilename string) error

func DirEquals Uses

func DirEquals(a, b string) (bool, error)

DirEquals check if two directories are referring to the same directory

func Exists Uses

func Exists(name string) bool

func IsDirWriteable Uses

func IsDirWriteable(dir string) error

IsDirWriteable checks if dir is writable by writing and removing a file to dir. It returns nil if dir is writable. Inspired by etcd fileutil.

Package file imports 4 packages (graph) and is imported by 5 packages. Updated 2021-01-09. Refresh now. Tools for package owners.