sys

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileModDateCompare

func FileModDateCompare(file1, file2 string) (diff int, err error)

FileModDateCompare compares the modification date of two files, and returns -1 if the first is older than the second, 0 if they are the same, and 1 if the 2nd is older than the first. Returns an error if either is not a file.

func FileRoot added in v0.0.9

func FileRoot(filename string) string

FileRoot returns the name of a file without any extensions.

func IsDir added in v0.0.9

func IsDir(path string) bool

IsDir returns true if the given path exists and is a directory

func LaunchChrome

func LaunchChrome(url string) (err error)

LaunchChromeHeadlessBrowser will launch google chrome with the given url.

func LaunchDefaultBrowser

func LaunchDefaultBrowser(url string) (err error)

LaunchDefaultBrowser launches the system's default browser and opens the browser to the given url. Not that most Linux systems do not have a default.

func PathExists

func PathExists(path string) bool

PathExists returns true if the given path exists in the OS. This does not necessarily mean that the path is usable. It may be write or read protected. But at least you know its there.

func SourceDirectory added in v0.0.9

func SourceDirectory() (dir string)

SourceDirectory is a utility function that returns the path to the directory of the file that called it.

func SourcePath added in v0.0.9

func SourcePath() (file string)

SourcePath is a utility function that returns the path to the file that called it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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