util

package
v0.0.0-...-03c5838 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Copyright (C) 2018 go-cloudcard authors

This file is part of the go-cloudcard library.

the go-cloudcard library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

the go-cloudcard library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the go-cloudcard library. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFileExists = errors.New("file exists")
)

Functions

func AbsolutePath

func AbsolutePath(datadir string, filename string) string

AbsolutePath returns datadir + filename, or filename if it is absolute.

func CreateDirIfNotExist

func CreateDirIfNotExist(dir string) error

func FileExists

func FileExists(path string) (bool, error)

func FileWrite

func FileWrite(file string, content []byte, overwrite bool) error

func GetCurrentPath

func GetCurrentPath() (string, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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