love.filesystem.getDirectoryItems

love.filesystem.getDirectoryItems Available since LÖVE 0.9.0 It has been renamed from love.filesystem.enumerate. Returns a table with the names of files and subdirectories in the specified path. The table is not sorted in any way; the order is undefined. If the path passed to the function exists in the game and the save directory, it will list the files and directories from both places. Function Synopsis files = love.filesystem.getDirectoryItems( dir ) Arguments string dir The directory

love.filesystem.getIdentity

love.filesystem.getIdentity Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets the write directory name for your game. Note that this only returns the name of the folder to store your files in, not the full path. Function Synopsis name = love.filesystem.getIdentity( ) Arguments None. Returns string name The identity that is used as write directory. See Also love.filesystem love.filesystem.setIdentity

love.filesystem.getLastModified

love.filesystem.getLastModified Gets the last modification time of a file. Function Synopsis modtime, errormsg = love.filesystem.getLastModified( filename ) Arguments string filename The path and name to a file. Returns number modtime The last modification time in seconds since the unix epoch or nil on failure. string errormsg The error message on failure. Examples Getting the time of a file and printing it as a date. modtime, errormsg = love.filesystem.getLastModified("file.dat")   if

love.filesystem.getRealDirectory

love.filesystem.getRealDirectory Available since LÖVE 0.9.2 This function is not supported in earlier versions. Gets the platform-specific absolute path of the directory containing a filepath. This can be used to determine whether a file is inside the save directory or the game's source .love. Function Synopsis realdir = love.filesystem.getRealDirectory( filepath ) Arguments string filepath The filepath to get the directory of. Returns string realdir The platform-specific full path of

love.filesystem.getRequirePath

love.filesystem.getRequirePath Available since LÖVE 0.10.0 This function is not supported in earlier versions. Gets the filesystem paths that will be searched when require is called. The paths string returned by this function is a sequence of path templates separated by semicolons. The argument passed to require will be inserted in place of any question mark ("?") character in each template (after the dot characters in the argument passed to require are replaced by directory separators.)

love.filesystem.getSaveDirectory

love.filesystem.getSaveDirectory Gets the full path to the designated save directory. This can be useful if you want to use the standard io library (or something else) to read or write in the save directory. Function Synopsis dir = love.filesystem.getSaveDirectory( ) Arguments None. Returns string dir The absolute path to the save directory. See Also love.filesystem

love.filesystem.getSize

love.filesystem.getSize Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets the size in bytes of a file. Function Synopsis size, errormsg = love.filesystem.getSize( filename ) Arguments string filename The path and name to a file. Returns number size The size in bytes of the file, or nil on failure. string errormsg (nil) The error message on failure. See Also love.filesystem

love.filesystem.getSource

love.filesystem.getSource Available since LÖVE 0.9.0 This function is not supported in earlier versions. Returns the full path to the the .love file or directory. If the game is fused to the LÖVE executable, then the executable is returned. Function Synopsis path = love.filesystem.getSource( ) Arguments None. Returns string path The full platform-dependent path of the .love file or directory. See Also love.filesystem love.filesystem.isFused love.filesystem.getSourceBaseDirectory

love.filesystem.getSourceBaseDirectory

love.filesystem.getSourceBaseDirectory Available since LÖVE 0.9.0 This function is not supported in earlier versions. Returns the full path to the directory containing the .love file. If the game is fused to the LÖVE executable, then the directory containing the executable is returned. If love.filesystem.isFused is true, the path returned by this function can be passed to love.filesystem.mount, which will make the directory containing the main game (e.g. C:\Program Files\coolgame\) readabl

love.filesystem.getUserDirectory

love.filesystem.getUserDirectory Returns the path of the user's directory Function Synopsis path = love.filesystem.getUserDirectory( ) Arguments None. Returns string path The path of the user's directory See Also love.filesystem