HolyLib Wiki

filesystem.AsyncRead

 FSASYNC filesystem.AsyncRead( string fileName, string gamePath, function callback )

Description

Reads a file async and calls the callback with the contents.

Arguments

1string fileName

file to read

2string gamePath

game path to use

3function callback

the callback that is called after the file was read

Function argument(s):
1string fileName -

the provided fileName

2string gamePath -

the provided gamePath

3number status -

status of read operation. Returns a FSASYNC enum

4string content -

the read content or nil

Function return argument(s):

Returns

1FSASYNC status

Returns FSASYNC if any issues occurred