Nocare3/love2dapi_chunks huggingface dataset:
love.filesystem.getCRequirePath
Gets the filesystem paths that will be searched for c libraries 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.) Additionally, any occurrence of a double question mark ('??') will be replaced by the name passed to require and the default library extension for the platform.

The paths are relative to the game's source and save directories, as well as any paths mounted with love.filesystem.mount.
paths = love.filesystem.getCRequirePath()
paths string The paths that the ''require'' function will check for c libraries in love's filesystem.
love.filesystem.getDirectoryItems
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.
files = love.filesystem.getDirectoryItems( dir )
dir string The directory.
files table A sequence with the names of all files and subdirectories as strings.
files = love.filesystem.getDirectoryItems( dir, callback )
dir string The directory.
callback function A function which is called for each file and folder in the directory. The filename is passed to the function as an argument.
files table A sequence with the names of all files and subdirectories as strings.
love.filesystem.getIdentity
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.
name = love.filesystem.getIdentity()
name string The identity that is used as write directory.
love.filesystem.getInfo
Gets information about the specified file or directory.
info = love.filesystem.getInfo( path, filtertype )
path string The file or directory path to check.
filtertype (nil) FileType If supplied, this parameter causes getInfo to only return the info table if the item at the given path matches the specified file type.
info table A table containing information about the specified path, or nil if nothing exists at the path. The table contains the following fields:
info.type FileType The type of the object at the path (file, directory, symlink, etc.)
info.size number The size in bytes of the file, or nil if it can't be determined.
info.modtime number The file's last modification time in seconds since the unix epoch, or nil if it can't be determined.
info = love.filesystem.getInfo( path, info )
path string The file or directory path to check.
info table A table which will be filled in with info about the specified path.
info table The table given as an argument, or nil if nothing exists at the path. The table will be filled in with the following fields:
info.type FileType The type of the object at the path (file, directory, symlink, etc.)
info.size number The size in bytes of the file, or nil if it can't be determined.
info.modtime number The file's last modification time in seconds since the unix epoch, or nil if it can't be determined.
info = love.filesystem.getInfo( path, filtertype, info )
path string The file or directory path to check.
filtertype FileType Causes getInfo to only return the info table if the item at the given path matches the specified file type.
info table A table which will be filled in with info about the specified path.
info table The table given as an argument, or nil if nothing exists at the path. The table will be filled in with the following fields:
info.type FileType The type of the object at the path (file, directory, symlink, etc.)
info.size number The size in bytes of the file, or nil if it can't be determined.
info.modtime number The file's last modification time in seconds since the unix epoch, or nil if it can't be determined.
love.filesystem.getRealDirectory
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.
realdir = love.filesystem.getRealDirectory( filepath )
filepath string The filepath to get the directory of.
realdir string The platform-specific full path of the directory containing the filepath.
love.filesystem.getRequirePath
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.)

The paths are relative to the game's source and save directories, as well as any paths mounted with love.filesystem.mount.
paths = love.filesystem.getRequirePath()
paths string The paths that the ''require'' function will check in love's filesystem.
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.
dir = love.filesystem.getSaveDirectory()
dir string The absolute path to the save directory.
love.filesystem.getSource
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.
path = love.filesystem.getSource()
path string The full platform-dependent path of the .love file or directory.
love.filesystem.getSourceBaseDirectory
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\) readable by love.filesystem.
path = love.filesystem.getSourceBaseDirectory()
path string The full platform-dependent path of the directory containing the .love file.
love.filesystem.getUserDirectory
Returns the path of the user's directory
path = love.filesystem.getUserDirectory()
path string The path of the user's directory
love.filesystem.getWorkingDirectory
Gets the current working directory.
cwd = love.filesystem.getWorkingDirectory()
cwd string The current working directory.
love.filesystem.isFused
Gets whether the game is in fused mode or not.

If a game is in fused mode, its save directory will be directly in the Appdata directory instead of Appdata/LOVE/. The game will also be able to load C Lua dynamic libraries which are located in the save directory.

A game is in fused mode if the source .love has been fused to the executable (see Game Distribution), or if '--fused' has been given as a command-line argument when starting the game.
fused = love.filesystem.isFused()
fused boolean True if the game is in fused mode, false otherwise.
love.filesystem.lines
Iterate over the lines in a file.
iterator = love.filesystem.lines( name )
name string The name (and path) of the file
iterator function A function that iterates over all the lines in the file
love.filesystem.load
Loads a Lua file (but does not run it).
chunk, errormsg = love.filesystem.load( name )
name string The name (and path) of the file.
chunk function The loaded chunk.
errormsg string The error message if file could not be opened.
love.filesystem.mount
Mounts a zip file or folder in the game's save directory for reading.

It is also possible to mount love.filesystem.getSourceBaseDirectory if the game is in fused mode.
success = love.filesystem.mount( archive, mountpoint, appendToPath )
archive string The folder or zip file in the game's save directory to mount.
mountpoint string The new path the archive will be mounted to.
appendToPath (false) boolean Whether the archive will be searched when reading a filepath before or after already-mounted archives. This includes the game's source and save directories.
success boolean True if the archive was successfully mounted, false otherwise.
success = love.filesystem.mount( filedata, mountpoint, appendToPath )
filedata FileData The FileData object in memory to mount.
mountpoint string The new path the archive will be mounted to.
appendToPath (false) boolean Whether the archive will be searched when reading a filepath before or after already-mounted archives. This includes the game's source and save directories.
success boolean True if the archive was successfully mounted, false otherwise.
success = love.filesystem.mount( data, archivename, mountpoint, appendToPath )
data Data The Data object in memory to mount.
archivename string The name to associate the mounted data with, for use with love.filesystem.unmount. Must be unique compared to other mounted data.
mountpoint string The new path the archive will be mounted to.
appendToPath (false) boolean Whether the archive will be searched when reading a filepath before or after already-mounted archives. This includes the game's source and save directories.
success boolean True if the archive was successfully mounted, false otherwise.
love.filesystem.newFile
Creates a new File object.

It needs to be opened before it can be accessed.
file = love.filesystem.newFile( filename )
filename string The filename of the file.
file File The new File object.
file, errorstr = love.filesystem.newFile( filename, mode )
filename string The filename of the file.
mode FileMode The mode to open the file in.
file File The new File object, or nil if an error occurred.
errorstr string The error string if an error occurred.
love.filesystem.newFileData
Creates a new FileData object from a file on disk, or from a string in memory.
data = love.filesystem.newFileData( contents, name )
contents string The contents of the file in memory represented as a string.
name string The name of the file. The extension may be parsed and used by LÖVE when passing the FileData object into love.audio.newSource.
data FileData The new FileData.
data = love.filesystem.newFileData( originaldata, name )
originaldata Data The Data object to copy into the new FileData object.
name string The name of the file. The extension may be parsed and used by LÖVE when passing the FileData object into love.audio.newSource.
data FileData The new FileData.
data, err = love.filesystem.newFileData( filepath )
filepath string Path to the file.
data FileData The new FileData, or nil if an error occurred.
err string The error string, if an error occurred.
love.filesystem.read
Read the contents of a file.
contents, size, contents, error = love.filesystem.read( name, size )
name string The name (and path) of the file.
size (all) number How many bytes to read.
contents string The file contents.
size number How many bytes have been read.
contents nil returns nil as content.
error string returns an error message.
contents, size, contents, error = love.filesystem.read( container, name, size )
container ContainerType What type to return the file's contents as.
name string The name (and path) of the file
size (all) number How many bytes to read
contents FileData or string FileData or string containing the file contents.
size number How many bytes have been read.
contents nil returns nil as content.
error string returns an error message.
love.filesystem.remove
Removes a file or empty directory.
success = love.filesystem.remove( name )
name string The file or directory to remove.
success boolean True if the file/directory was removed, false otherwise.
love.filesystem.setCRequirePath
Sets the filesystem paths that will be searched for c libraries 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.) Additionally, any occurrence of a double question mark ('??') will be replaced by the name passed to require and the default library extension for the platform.

The paths are relative to the game's source and save directories, as well as any paths mounted with love.filesystem.mount.
love.filesystem.setCRequirePath( paths )
paths string The paths that the ''require'' function will check in love's filesystem.
love.filesystem.setIdentity
Sets the write directory for your game.

Note that you can only set the name of the folder to store your files in, not the location.
love.filesystem.setIdentity( name )
name string The new identity that will be used as write directory.
love.filesystem.setIdentity( name )
name string The new identity that will be used as write directory.
love.filesystem.setRequirePath
Sets the filesystem paths that will be searched when require is called.

The paths string given to 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.)

The paths are relative to the game's source and save directories, as well as any paths mounted with love.filesystem.mount.
love.filesystem.setRequirePath( paths )
paths string The paths that the ''require'' function will check in love's filesystem.
love.filesystem.setSymlinksEnabled
Sets whether love.filesystem follows symbolic links. It is enabled by default in version 0.10.0 and newer, and disabled by default in 0.9.2.
love.filesystem.setSymlinksEnabled( enable )
enable boolean Whether love.filesystem should follow symbolic links.
love.filesystem.unmount
Unmounts a zip file or folder previously mounted for reading with love.filesystem.mount.
success = love.filesystem.unmount( archive )
archive string The folder or zip file in the game's save directory which is currently mounted.
success boolean True if the archive was successfully unmounted, false otherwise.
love.filesystem.write
Write data to a file in the save directory. If the file existed already, it will be completely replaced by the new contents.
success, message = love.filesystem.write( name, data, size )
name string The name (and path) of the file.
data string The string data to write to the file.
size (all) number How many bytes to write.
success boolean If the operation was successful.
message string Error message if operation was unsuccessful.
success, message = love.filesystem.write( name, data, size )
name string The name (and path) of the file.
data Data The Data object to write to the file.
size (all) number How many bytes to write.
success boolean If the operation was successful.
message string Error message if operation was unsuccessful.
File:close
Closes a File.
success = File:close()
success boolean Whether closing was successful.
File:flush
Flushes any buffered written data in the file to the disk.
success, err = File:flush()
success boolean Whether the file successfully flushed any buffered data to the disk.
err string The error string, if an error occurred and the file could not be flushed.
File:getBuffer
Gets the buffer mode of a file.
mode, size = File:getBuffer()
mode BufferMode The current buffer mode of the file.
size number The maximum size in bytes of the file's buffer.
File:getFilename
Gets the filename that the File object was created with. If the file object originated from the love.filedropped callback, the filename will be the full platform-dependent file path.
filename = File:getFilename()
filename string The filename of the File.
File:getMode
Gets the FileMode the file has been opened with.
mode = File:getMode()
mode FileMode The mode this file has been opened with.
File:getSize
Returns the file size.
size = File:getSize()
size number The file size in bytes.
File:isEOF
Gets whether end-of-file has been reached.
eof = File:isEOF()
eof boolean Whether EOF has been reached.
File:isOpen
Gets whether the file is open.
open = File:isOpen()
open boolean True if the file is currently open, false otherwise.
File:lines
Iterate over all the lines in a file.
iterator = File:lines()
iterator function The iterator (can be used in for loops).
File:open
Open the file for write, read or append.
ok, err = File:open( mode )
mode FileMode The mode to open the file in.
ok boolean True on success, false otherwise.
err string The error string if an error occurred.
File:read
Read a number of bytes from a file.
contents, size = File:read( bytes )
bytes (all) number The number of bytes to read.
contents string The contents of the read bytes.
size number How many bytes have been read.
contents, size = File:read( container, bytes )
container ContainerType What type to return the file's contents as.
bytes (all) number The number of bytes to read.
contents FileData or string FileData or string containing the read bytes.
size number How many bytes have been read.
File:seek
Seek to a position in a file
success = File:seek( pos )
pos number The position to seek to
success boolean Whether the operation was successful
File:setBuffer
Sets the buffer mode for a file opened for writing or appending. Files with buffering enabled will not write data to the disk until the buffer size limit is reached, depending on the buffer mode.

File:flush will force any buffered data to be written to the disk.
success, errorstr = File:setBuffer( mode, size )
mode BufferMode The buffer mode to use.
size (0) number The maximum size in bytes of the file's buffer.
success boolean Whether the buffer mode was successfully set.
errorstr string The error string, if the buffer mode could not be set and an error occurred.
File:tell
Returns the position in the file.
pos = File:tell()
pos number The current position.
File:write
Write data to a file.
success, err = File:write( data, size )
data string The string data to write.
size (all) number How many bytes to write.
success boolean Whether the operation was successful.
err string The error string if an error occurred.
success, errorstr = File:write( data, size )
data Data The Data object to write.
size (all) number How many bytes to write.
success boolean Whether the operation was successful.
errorstr string The error string if an error occurred.
FileData:getExtension
Gets the extension of the FileData.
ext = FileData:getExtension()
ext string The extension of the file the FileData represents.
FileData:getFilename
Gets the filename of the FileData.
name = FileData:getFilename()
name string The name of the file the FileData represents.
love.font.newBMFontRasterizer
Creates a new BMFont Rasterizer.
rasterizer = love.font.newBMFontRasterizer( imageData, glyphs, dpiscale )
imageData ImageData The image data containing the drawable pictures of font glyphs.
glyphs string The sequence of glyphs in the ImageData.
dpiscale (1) number DPI scale.
rasterizer Rasterizer The rasterizer.
rasterizer = love.font.newBMFontRasterizer( fileName, glyphs, dpiscale )
fileName string The path to file containing the drawable pictures of font glyphs.
glyphs string The sequence of glyphs in the ImageData.
dpiscale (1) number DPI scale.
rasterizer Rasterizer The rasterizer.
love.font.newGlyphData
Creates a new GlyphData.
love.font.newGlyphData( rasterizer, glyph )
rasterizer Rasterizer The Rasterizer containing the font.
glyph number The character code of the glyph.
love.font.newImageRasterizer
Creates a new Image Rasterizer.
rasterizer = love.font.newImageRasterizer( imageData, glyphs, extraSpacing, dpiscale )
imageData ImageData Font image data.
glyphs string String containing font glyphs.
extraSpacing (0) number Font extra spacing.
dpiscale (1) number Font DPI scale.
rasterizer Rasterizer The rasterizer.
love.font.newRasterizer
Creates a new Rasterizer.
rasterizer = love.font.newRasterizer( filename )
filename string The font file.
rasterizer Rasterizer The rasterizer.
rasterizer = love.font.newRasterizer( data )
data FileData The FileData of the font file.
rasterizer Rasterizer The rasterizer.
rasterizer = love.font.newRasterizer( size, hinting, dpiscale )
size (12) number The font size.
hinting ('normal') HintingMode True Type hinting mode.
dpiscale (love.window.getDPIScale()) number The font DPI scale.
rasterizer Rasterizer The rasterizer.
rasterizer = love.font.newRasterizer( fileName, size, hinting, dpiscale )
fileName string Path to font file.
size (12) number The font size.
hinting ('normal') HintingMode True Type hinting mode.
dpiscale (love.window.getDPIScale()) number The font DPI scale.
rasterizer Rasterizer The rasterizer.
rasterizer = love.font.newRasterizer( fileData, size, hinting, dpiscale )
fileData FileData File data containing font.
size (12) number The font size.
hinting ('normal') HintingMode True Type hinting mode.
dpiscale (love.window.getDPIScale()) number The font DPI scale.
rasterizer Rasterizer The rasterizer.
rasterizer = love.font.newRasterizer( imageData, glyphs, dpiscale )
imageData ImageData The image data containing the drawable pictures of font glyphs.
glyphs string The sequence of glyphs in the ImageData.
dpiscale (1) number DPI scale.
rasterizer Rasterizer The rasterizer.
rasterizer = love.font.newRasterizer( fileName, glyphs, dpiscale )
fileName string The path to file containing the drawable pictures of font glyphs.
glyphs string The sequence of glyphs in the ImageData.
dpiscale (1) number DPI scale.
rasterizer Rasterizer The rasterizer.
love.font.newTrueTypeRasterizer
Creates a new TrueType Rasterizer.
rasterizer = love.font.newTrueTypeRasterizer( size, hinting, dpiscale )
size (12) number The font size.
hinting ('normal') HintingMode True Type hinting mode.
dpiscale (love.window.getDPIScale()) number The font DPI scale.
rasterizer Rasterizer The rasterizer.
rasterizer = love.font.newTrueTypeRasterizer( fileName, size, hinting, dpiscale )
fileName string Path to font file.
size (12) number The font size.
hinting ('normal') HintingMode True Type hinting mode.
dpiscale (love.window.getDPIScale()) number The font DPI scale.
rasterizer Rasterizer The rasterizer.
rasterizer = love.font.newTrueTypeRasterizer( fileData, size, hinting, dpiscale )
fileData FileData File data containing font.
size (12) number The font size.
hinting ('normal') HintingMode True Type hinting mode.
dpiscale (love.window.getDPIScale()) number The font DPI scale.
rasterizer Rasterizer The rasterizer.
GlyphData:getAdvance
Gets glyph advance.
advance = GlyphData:getAdvance()
advance number Glyph advance.
GlyphData:getBearing
Gets glyph bearing.
bx, by = GlyphData:getBearing()
bx number Glyph bearing X.
by number Glyph bearing Y.
GlyphData:getBoundingBox
Gets glyph bounding box.
x, y, width, height = GlyphData:getBoundingBox()
x number Glyph position x.
y number Glyph position y.
width number Glyph width.
height number Glyph height.
GlyphData:getDimensions
Gets glyph dimensions.
width, height = GlyphData:getDimensions()
width number Glyph width.
height number Glyph height.
GlyphData:getFormat
Gets glyph pixel format.
format = GlyphData:getFormat()
format PixelFormat Glyph pixel format.
GlyphData:getGlyph
Gets glyph number.
glyph = GlyphData:getGlyph()
glyph number Glyph number.
GlyphData:getGlyphString
Gets glyph string.
glyph = GlyphData:getGlyphString()
glyph string Glyph string.
GlyphData:getHeight
Gets glyph height.
height = GlyphData:getHeight()
height number Glyph height.
GlyphData:getWidth
Gets glyph width.
width = GlyphData:getWidth()
width number Glyph width.
Rasterizer:getAdvance
Gets font advance.
advance = Rasterizer:getAdvance()
advance number Font advance.
Rasterizer:getAscent
Gets ascent height.
height = Rasterizer:getAscent()
height number Ascent height.
Rasterizer:getDescent
Gets descent height.
height = Rasterizer:getDescent()
height number Descent height.
Rasterizer:getGlyphCount
Gets number of glyphs in font.
count = Rasterizer:getGlyphCount()
count number Glyphs count.
Rasterizer:getGlyphData
Gets glyph data of a specified glyph.
glyphData = Rasterizer:getGlyphData( glyph )
glyph string Glyph
glyphData GlyphData Glyph data
glyphData = Rasterizer:getGlyphData( glyphNumber )
glyphNumber number Glyph number
glyphData GlyphData Glyph data