require

Opens and executes a Lua file.

require "foo"

Note: Do not include the ".lua" on the end of the path.

This function is included on this wiki because LÖVE changes the way it works: it searches in the save directory and then in the game directory or the .love.

See Also

Programming in Lua