fileutil

package
v9.1.81+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: MIT Imports: 7 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExists

func FileExists(filename ...string) bool

FileExists returns true if the path components exist

func FindFiles

func FindFiles(dir string, pattern *regexp.Regexp) ([]string, error)

FindFiles helper

func IsZeroLengthFile

func IsZeroLengthFile(fn string) bool

IsZeroLengthFile returns true if the filename specified is empty (0 bytes)

func OpenFile

func OpenFile(fn string) (io.ReadCloser, error)

OpenFile will open a file and if it's gzipped return a gzipped reader as io.ReadCloser but will close both streams on close

func Resolve

func Resolve(filename string) (string, error)

Resolve with resolve a relative file path

func ResolveFileName

func ResolveFileName(fn string) string

ResolveFileName will attempt to resolve a filename attempting to look at both the basic name or the name + .gz extension

Types

This section is empty.

Jump to

Keyboard shortcuts

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