file

package
v6.0.0-beta1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SafeFileRotate

func SafeFileRotate(path, tempfile string) error

SafeFileRotate safely rotates an existing file under path and replaces it with the tempfile

Types

type FileInfo

type FileInfo interface {
	os.FileInfo
	UID() (int, error) // UID of the file owner. Returns an error on non-POSIX file systems.
	GID() (int, error) // GID of the file owner. Returns an error on non-POSIX file systems.
}

A FileInfo describes a file and is returned by Stat and Lstat.

func Lstat

func Lstat(name string) (FileInfo, error)

Lstat returns a FileInfo describing the named file. If the file is a symbolic link, the returned FileInfo describes the symbolic link. Lstat makes no attempt to follow the link. If there is an error, it will be of type *PathError.

func Stat

func Stat(name string) (FileInfo, error)

Stat returns a FileInfo describing the named file. If there is an error, it will be of type *PathError.

Jump to

Keyboard shortcuts

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