e2 docs files - wiremod/wire GitHub Wiki

Jump to table of contents

Files

fileLoad(String Filename)

Loads specified file to the server (20 ops)

Number = fileCanLoad()

Returns 1 if the file can be loaded (5 ops)

Number = fileLoaded()

Returns whether or not the file has been loaded onto the server (5 ops)

Number = fileLoading()

Returns whether a file is currently uploading (5 ops)

Number = fileStatus()

Returns the status of the upload in progress. Returns one of _FILE_UNKNOWN, _FILE_OK, _FILE_TIMEOUT, _FILE_404 or _FILE_TRANSFER_ERROR (5 ops)

String = fileName()

Returns the name of the last uploaded file, or an empty string if there is no currently uploaded file (5 ops)

String = fileRead()

Returns the contents of the last uploaded file, or an empty string if there is no currently uploaded file (10 ops)

Number = fileMaxSize()

Returns the maximum file size that can be uploaded or downloaded. Default is 300 KiB (5 ops)

Number = fileCanWrite()

Returns 1 if the file can be written (5 ops)

fileWrite(String Filename, String Data)

Writes string data to the file overwriting it (20 ops)

fileAppend(String Filename, String Data)

Adds string data to the end of the file (20 ops)

fileList(String Dir)

Returns an array of file names that have been loaded (20 ops)

Number = fileCanList()

Returns 1 if the file list can be uploaded to the server (5 ops)

Number = fileLoadedList()

If the list has been loaded and it is called, it will return 1. Any time after that until a new list is loaded it will return 0 (5 ops)

Number = fileLoadingList()

Returns whether a list is currently uploading (5 ops)

Array = fileReadList()

Returns the contents of the last uploaded list (5 ops)

runOnFile(Number Active)

Specifies whether the E2 will run when a file finishes uploading (5 ops)

Number = fileClk()

Returns whether the execution was run because a file finished uploading (5 ops)

Number = fileClk(String Filename)

Returns whether the execution was run because a file finished uploading and was that file of a specific file name (5 ops)

runOnList(Number Active)

Specifies whether the E2 will run when a list finishes uploading (5 ops)

Number = fileListClk()

Returns whether the execution was run because a list was uploaded to the server (5 ops)

Number = fileListClk(String Dir)

Returns whether the execution was run because a list with specified name was uploaded to the server (5 ops)