Methods
FileSystemUtils.absoluteToLocalPath(prefix: string, image: string, path: string)
TODO: this function is a mess please comment it later
@param prefix
— base directory of images in the mod
@param image
— raw image path specified by tileset/map
@param path
— path of tileset/map, image
is relative to this
@return final_path
— nil in case of error
Arguments:
prefix: string | base directory of images in the mod |
image: string | raw image path specified by tileset/map |
path: string | path of tileset/map, |
Returns:
final_path: string|nil | nil in case of error |
FileSystemUtils.findFiles(folder: any, base: any, path: any)
TODO: Merge with getFilesRecursive?
Arguments:
folder: any | |
base: any | |
path: any |
Returns:
1: table |
FileSystemUtils.getDirname(path: string)
See: https //stackoverflow.com/a/12191225
Arguments:
path: string |
Returns:
dirname: string |
FileSystemUtils.getFilesRecursive(dir: string, ext: string?)
Returns a table of file names within the specified directory, checking subfolders as well.
@param dir
— The file path to check, relative to the LÖVE Kristal directory.
@param ext
— If specified, only files with the specified extension will be returned, and the extension will be stripped. (eg. "png"
will only return .png files)
@return result
— The table of file names.
Arguments:
dir: string | The file path to check, relative to the LÖVE Kristal directory. |
ext: string? | If specified, only files with the specified extension will be returned, and the extension will be stripped. (eg. |
Returns:
result: string[] | The table of file names. |