The Virtual File System mapper package provides access on files by which may either exist in directories of the harddisc or in zip file archives. Overloads loadfile/dofile in order to load lua source code from zip archives as well. Further filehandlers can be added during runtime which allows loading files from different locations (i.e. Network) as well.
adds a callback function that is called when a file should be loaded. It receives two arguments: the filname to be looked for and a boolean value if it should be read and returned:
function func (filename, read) return read and (read the file content) or (true if it exists) endIf the function returns nil (nothing), further callback functions are called. If it returns false, it is assumed that the file does not exist. If it returns true, the file exists and it should be possible to return the content as well if needed. Luxinia checks if a file exists before it trys to open it. If this callback returns true, it MUST be able to return the filecontent if requested. Otherwise Luxinia might crash. This callback might be extended in near future to determine the filetype as well by returning the filetype.