internal

package
v0.0.0-...-89e092a Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2017 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Verbose bool

Verbose specifies if verbose logging is enabled.

Functions

func HasFilepathPrefix

func HasFilepathPrefix(path, prefix string) bool

HasFilepathPrefix will determine if "path" starts with "prefix" from the point of view of a filesystem.

Unlike filepath.HasPrefix, this function is path-aware, meaning that it knows that two directories /foo and /foobar are not the same thing, and therefore HasFilepathPrefix("/foobar", "/foo") will return false.

This function also handles the case where the involved filesystems are case-insensitive, meaning /foo/bar and /Foo/Bar correspond to the same file. In that situation HasFilepathPrefix("/Foo/Bar", "/foo") will return true. The implementation is *not* OS-specific, so a FAT32 filesystem mounted on Linux will be handled correctly.

func IsDir

func IsDir(name string) (bool, error)

func Logf

func Logf(format string, args ...interface{})

func Vlogf

func Vlogf(format string, args ...interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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