io

package
v0.0.0-...-4d00197 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetachFileExtension

func DetachFileExtension(fName string) (string, string)

func GetFileReader

func GetFileReader(fName string) (io.Reader, *os.File, error)

GetFileReader reads an input file, gzipped or plain text, and returns an io.Reader for line scanning, along with the file handle, that needs to be closed after reading.

func IsDirectory

func IsDirectory(path string) (bool, error)

func IsFile

func IsFile(fName string) bool

IsFile returns true if the given file exists (as a file or as a directory)

func ReadFileToLines

func ReadFileToLines(fName string) ([]string, error)

ReadFileToLines Read a file into a list of lines

func ReadFileToString

func ReadFileToString(fName string) (string, error)

ReadFileToString Read a file into a string using ioutil.ReadFile (keeping final newline, if any)

func ReadStdinToLines

func ReadStdinToLines() ([]string, error)

ReadStdinToLines Read stdin into a list of lines

func ReadStdinToString

func ReadStdinToString() (string, error)

ReadStdinToString Read stdin into a string using ioutil.ReadFile (removing final newline, if any)

func RemoveFileExtension

func RemoveFileExtension(fName string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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