read

fun read(importName: String, fileName: String): String?

Reads a file from folder in modules. Returns an empty string if file is not found.

Return

the string in the file

Parameters

importName

name of the import

fileName

name of the file


fun read(fileLocation: String): String?

Reads a file from anywhere on the system. Use "./" for the ".minecraft" folder. Returns an empty string if file is not found.

Return

the string in the file

Parameters

fileLocation

the location and file name


fun read(file: File): String?

Reads a file from anywhere on the system using java.io.File.

Return

the string in the file

Parameters

file

the java.io.File to read