File Lib
Functions
Link copied to clipboard
Decodes a base64 string to a string
Link copied to clipboard
Deletes a directory at the specified location
Link copied to clipboard
Encodes a string to a base64 string
Link copied to clipboard
fun getUrlContent(theUrl: String, userAgent: String? = "Mozilla/5.0"): String
Content copied to clipboard
Gets the contents of a url as a string.
Link copied to clipboard
Determines if a file or directory exists at the specified location
Link copied to clipboard
Reads a file from anywhere on the system using java.io.File.
Reads a file from anywhere on the system. Use "./" for the ".minecraft" folder. Returns an empty string if file is not found.
Reads a file from folder in modules. Returns an empty string if file is not found.
Link copied to clipboard
fun write(fileLocation: String, toWrite: String, recursive: Boolean = false)
Content copied to clipboard
Writes a file to anywhere on the system. Use "./" for the ".minecraft" folder.
fun write(importName: String, fileName: String, toWrite: String, recursive: Boolean = false)
Content copied to clipboard
Writes a file to folder in modules.