fileio

package
v0.0.0-...-b76af60 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPDDLFiles

func GetPDDLFiles(folder string) (domfiles, probfiles []os.FileInfo, err error)

GetPDDLFiles returns all files in a given folder that contain the word `problem` or `domain`. An error is returned if a file is encountered that does not contain either domain or problem in its filename OR if the number of domain files does not match the number of domain files.

func ReadFileToLines

func ReadFileToLines(filename string, trimSpaces bool) ([]string, error)

ReadFileToLines reads in a file line by line and returns an array of strings, trims spaces at begin and end of each line if trimSpaces flag is set

Types

type DiscardReader

type DiscardReader struct{}

DiscardReader implements io.Reader interface, does nothing

func (DiscardReader) Read

func (d DiscardReader) Read(b []byte) (n int, err error)

Jump to

Keyboard shortcuts

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