osutil

package
v0.0.0-...-2ad639e Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentUsername

func CurrentUsername() string

CurrentUsername returns the username of the current user.

func IsDir

func IsDir(dir string) bool

IsDir returns true if given path is a directory, and returns false when it's a file or does not exist.

func IsExist

func IsExist(path string) bool

IsExist returns true if a file or directory exists.

func IsFile

func IsFile(path string) bool

IsFile returns true if given path exists as a file (i.e. not a directory).

func NewError

func NewError(err error) error

NewError wraps given error.

Types

type Error

type Error struct {
	// contains filtered or unexported fields
}

Error is a wrapper of an OS error, which handles not found.

func (Error) NotFound

func (e Error) NotFound() bool

Jump to

Keyboard shortcuts

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