osutils

package
v0.0.0-...-6b04d54 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AppHomePath : Application Home Path
	AppHomePath = ".hyperml"

	// ServerHomePath : Server Home Path
	ServerHomePath = "server"

	// ClientHomePath : Client home path
	ClientHomePath = "client"

	// DefaultFilePerm : Default File permissions
	DefaultFilePerm = 0644

	// DefaultPerm : Default permission for file/folder
	DefaultPerm = 0644

	//ConfigFileName : Config file name
	ConfigFileName = "config.json"
)

Variables

This section is empty.

Functions

func AppHome

func AppHome() string

AppHome : Application Home directory. usually ~/.hyperml

func ClientHome

func ClientHome() string

ClientHome : Returns or Creates server home path. usually usually ~/.hyperml/client

func ConfigDefaultPath

func ConfigDefaultPath() string

ConfigDefaultPath : Returns server config file path

func ConfigDefaultPathValid

func ConfigDefaultPathValid() string

ConfigDefaultPathValid : Returns server config file path if file exists

func CreateDataDirPath

func CreateDataDirPath(datapath string) string

CreateDataDirPath : Appends Server home directory with data directory path creates any missing directories

func GetOsEnvVar

func GetOsEnvVar(name string) string

GetOsEnvVar :

func K8ConfigPath

func K8ConfigPath() string

K8ConfigPath :

func K8ConfigValidPath

func K8ConfigValidPath() (p string, fnerr error)

K8ConfigValidPath :

func PathExists

func PathExists(p string) bool

PathExists : Checks if a file exists at a given path

func ReadFile

func ReadFile(location string) ([]byte, error)

ReadFile : Read file from a given location

func SaveFile

func SaveFile(location string, data []byte) error

SaveFile : Write file at agiven location

func ServerHome

func ServerHome() string

ServerHome : Returns or Creates server home path. usually ~/.hyperml/server

Types

This section is empty.

Jump to

Keyboard shortcuts

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