KADABRA API

LARA API

LARA Common Language API

(.js)
laraImport("lara.util.LocalFolder");

(.lara)
import lara.util.LocalFolder;

LocalFolder

Constructor

LocalFolder

new LocalFolder(foldername)

Provides access to files in a specific folder.

Parameters

foldername: any

Instance Members

getBaseFolder

getBaseFolder()

Returns

any - java.io.File that represents the root of this LocalFolder

getFile

getFile(path)

Returns a file from the path relative to the LocalFolder location.

<p>If the path does not exist, or is not a file, throws an exception.

Parameters

path: any

Returns

any - java.io.File representing the given path relative to this LocalFolder

getFileList

getFileList(path)

Parameters

path: any

Returns

any - java.util.List with all the files in this LocalFolder

getFolder

getFolder(path)

Returns a folder from the path relative to the LocalFolder location.

<p>If the path does not exist, or is not a folder, throws an exception.

Parameters

path: any

Returns

any - java.io.File representing the given path relative to this LocalFolder

getJson

getJson(path)

Parameters

path: any

Returns

object - Decodes the specified file as a JSON file.

getString

getString(path)

Parameters

path: any

Returns

string - string with the contents of the given path

hasFolder

hasFolder(path)

Parameters

path: any