FileHandler

Object of FileHandler

class Object
trait Matchable
class Any

Value members

Concrete methods

def checkFileExists(filePath: String): Boolean

Check if file/directory exists

Check if file/directory exists

Returns:

a Boolean

def createDirectory(filePath: String): Unit

Creates a directory if not exists

Creates a directory if not exists

Value parameters:
filePath

a string with directory path

def readFile(filePath: String): Try[String]

Read file from path

Read file from path

Value parameters:
filePath

a string with file path

Returns:

a Try[String] with the file content

def writeFile(filePath: String, fileContent: String): Try[String]

Write the string in a file

Write the string in a file

Value parameters:
fileContent

a string with file content

filePath

a string with file path

Returns:

a Try[String] with the file path