Creates a new File object. It needs to be opened before it can be accessed.
file = love.filesystem.newFile( filename )
string filename
File file
Please note that this function will not return any error message (e.g. if you use an invalid filename) because it just creates the File Object. You can still check if the file is valid by using File:open which returns a boolean and an error message if something goes wrong while opening the file.
Available since LÖVE 0.9.0
This variant is not supported in earlier versions.
Creates a File object and opens it for reading, writing, or appending.
file, errorstr = love.filesystem.newFile( filename, mode )
File file
string errorstr
file = love.filesystem.newFile("data.txt") file:open("r") data = file:read() file:close() -- use the data ...
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.filesystem.newFile