File Utility

file_util.writeFile

This function will create a file within the novoline folder at .minecraft

Parameters

Type

Description

file_path

String

File path you want to create the file at

contents

String...

Contents you want t oset

file_util.writeFile(file_path,contents)

Example

// Creates a file at .minecraft/novoline/
file_util.writeFile("myscriptfile.txt","sample text");

file_util.createDirectory

This function will create a directory within the novoline folder at .minecraft

Parameters

Type

Description

dir_path

String

Directory path you want to create the directory at

file_util.createDirectory(dir_path)

Example

// Creates a directory at .minecraft/novoline/
file_util.createDirectory("myscriptdirectory");
// Creates a file at .minecraft/novoline/myscriptdirectory/
file_util.writeFile("myscriptdirectory/myscriptfile.txt","sample text");

file_util.readFile

This function will return the contents of a file (The file must not be outside the novoline folder)

Parameters

Type

path

String

file_util.readFile(path) - String

Last updated