file

package
v0.0.0-...-9be9164 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsPath

func AbsPath(path string) (string, error)

AbsPath returns the absolute path of the specified path, expanding the tilde character if necessary.

func CreateDirIfNotExists

func CreateDirIfNotExists(path string) error

CreateDirIfNotExists If we provide a file name/dir name it creates the specified directory if it does not exist.

func ExpandTild

func ExpandTild(path string) (string, error)

ExpandTild expands the tilde character in the specified path to the current user's home directory path.

func GetFileNameFromPath

func GetFileNameFromPath(path string) string

GetFileNameFromPath returns the file name from the specified path.

func IsDirectory

func IsDirectory(path string) bool

func ReadLines

func ReadLines(filename string, trim bool) ([]string, error)

ReadLines returns the lines of the specified file as string array.

Types

This section is empty.

Jump to

Keyboard shortcuts

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