Provides an interface to the user's filesystem.
Check whether a file or directory exists.
exists = love.filesystem.exists(filename)
Read the contents of a file.
contents, size = love.filesystem.read(name, size)
Write data to a file.
success, message = love.filesystem.write(name, data, size)
Sets the filesystem paths that will be searched when require is called.
love.filesystem.setRequirePath(paths)
Gets the filesystem paths that will be searched when require is called.
paths = love.filesystem.getRequirePath()
Loads a Lua file (but does not run it).
chunk, errormsg = love.filesystem.load(name)
Sets the write directory for your game.
love.filesystem.setIdentity(name)
Returns the path of the user's directory.
path = love.filesystem.getUserDirectory()
Check whether something is a directory.
isDir = love.filesystem.isDirectory(filename)
Check whether something is a file.
isFile = love.filesystem.isFile(filename)
Creates a directory.
success = love.filesystem.createDirectory(name)
Returns all the files and subdirectories in the directory.
files = love.filesystem.getDirectoryItems(dir)