basepath

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2015 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package basepath provides functionality to get the current absolute directory of the application. It also provides a method to return an absolute path from a possible relative path.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Basepath

type Basepath struct {
	Path string
}

A Basepath holds the current absolute directory of the application, and routines to return it.

func NewBasepath

func NewBasepath() (b Basepath, err error)

NewBasepath returns a new Basepath instance. It may also return an error, when the path could not be determined.

func (Basepath) GetPath

func (b Basepath) GetPath() string

GetPath returns the current absolute directory.

func (Basepath) GetPathWith

func (b Basepath) GetPathWith(file string) string

GetPathWith returns an absolute path to the given file. If the given file is relative the current absolute path will be prepended.

Jump to

Keyboard shortcuts

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