IOUtils

io.shiftleft.utils.IOUtils
object IOUtils

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
IOUtils.type

Members list

Value members

Concrete methods

def readEntireFile(path: Path): String

Reads a file at the given path and:

Reads a file at the given path and:

  • skips BOM if present
  • removes unpaired surrogates
  • uses UTF-8 encoding (replacing malformed and unmappable characters)

Value parameters

path

the file path

Attributes

Returns

a String with the given file's contents

def readLinesInFile(path: Path): Seq[String]

Reads a file at the given path and:

Reads a file at the given path and:

  • skips BOM if present
  • removes unpaired surrogates
  • uses UTF-8 encoding (replacing malformed and unmappable characters)

Value parameters

path

the file path

Attributes

Returns

a Seq with all lines in the given file as Strings