opsys

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2020 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package opsys provides an interface OS for interacting with the running operating system, both with the filesystem and with Mac OS commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OS

type OS interface {
	afero.Fs
	// FileExist checks if the given path already exists.
	FileExist(path string) (bool, error)
	// GetMacOSVersion checks the version of the current operating system,
	// assuming it is Mac OS.
	GetMacOSVersion() (*semver.Version, error)
	// GetContactMap gets a map of vcards indexed by phone numbers and email
	// addresses specified in those cards, from the vcard file at the given
	// path.
	GetContactMap(path string) (map[string]*vcard.Card, error)
}

OS interacts with the local filesystem and operating system.

func NewOS

func NewOS(fs afero.Fs, osStat func(string) (os.FileInfo, error), execCommand func(string, ...string) *exec.Cmd) OS

NewOS returns an OS from a given filesystem, os Stat, and exec Command.

Directories

Path Synopsis
Package mock_opsys is a generated GoMock package.
Package mock_opsys is a generated GoMock package.

Jump to

Keyboard shortcuts

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