fileUtils

package
v1.3.18 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentDirectory added in v1.1.1

func CurrentDirectory() string

CurrentDirectory will give the root directory.

func DirExists

func DirExists(dirName string) bool

DirExists will check the input directory is exist or not.

func FindDirectory

func FindDirectory(dirName string) string

FindDirectory will give the path of an input.

func InitUtils

func InitUtils() bool

InitUtils will ask question in the CLI.

func IsExists

func IsExists(path, dirName string) bool

IsExists will check the input directory is exists in the input path.

func MakeDirectory

func MakeDirectory(path string, dirName string) error

MakeDirectory will make directory according to input.

func MakeFile

func MakeFile(path string, fileName string) error

MakeFile will create new file according to input path and file name.

func PromptGetYesOrNoInput added in v1.1.1

func PromptGetYesOrNoInput(pc PromptContent) bool

PromptGetYesOrNoInput will return boolean value with respect to User input.

func WriteToFile

func WriteToFile(path, file, data string) error

WriteToFile for write input data into file with respect to path.

Types

type PromptContent added in v1.1.1

type PromptContent struct {
	ErrorMsg string
	Label    string
}

PromptContent is the type of Prompt.

Jump to

Keyboard shortcuts

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