Module
love.filesystem
Provides an interface to the user's filesystem.

This module provides access to Files in two places, and two places only:

  1. The root folder of the .love-file. (Alternatively a directory).
  2. The root folder of the write directory.

Each game is granted a single directory on the system where files can be saved through love.filesystem. These directories will typically be something like:

  1. C:\Documents and Settings\user\Application Data\Love\game or %appdata%\Love
  2. /home/user/.love/game or ~/.love/game

Files that are opened for write or append will always be created in the save directory. The same goes for other operations that involve writing to the filesystem, like mkdir.

Files that are opened for read will be looked for the game root folder, and then in the save directory (in that order). So if a file with a certain filename (and path) exist in both the .love-file and the save folder, the one in the .love-file takes precedence.

Currently, you have to set your game's identity first with love.filesystem.setIdentity()

Copyright © 2006-2010 LÖVE Development Team.