filesystem

package
v0.2.17 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnableToReadFile = "unable to read file: %v"
	ErrNilFile          = errors.New("file cannot be nil")
)

Functions

func CloseFile added in v0.2.15

func CloseFile(file *os.File) error

CloseFile closes the file

func GetCurrentDirectory

func GetCurrentDirectory() (string, error)

GetCurrentDirectory gets the current directory of the executable

func OpenFile added in v0.2.15

func OpenFile(path string) (*os.File, error)

OpenFile opens the file from the given path

func ReadCSVFile added in v0.2.15

func ReadCSVFile(file *os.File, readHeaders bool) (
	*[][]string,
	*[]string,
	error,
)

ReadCSVFile reads a CSV file and returns a slice of string slices

func ReadFile

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

ReadFile reads the file from the given path

Types

This section is empty.

Jump to

Keyboard shortcuts

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