Difference between revisions of "love.filesystem.write"

m (1 revision: Importing from potato (again).)
(Added note what to do if this function fails)
Line 1: Line 1:
 
 
Write data to a file
 
Write data to a file
 
== Function ==
 
== Function ==
Line 12: Line 11:
 
=== Returns ===
 
=== Returns ===
 
{{param|boolean|success|If the operation was successful}}
 
{{param|boolean|success|If the operation was successful}}
 +
=== Notes ===
 +
If you are getting the error message "Could not set write directory", try setting the save directory. This is done either with [[love.filesystem.setIdentity]] or by setting the identity field in [[love.conf]] (only available with love 0.7 or higher).
 
== See Also ==
 
== See Also ==
 
* [[parent::love.filesystem]]
 
* [[parent::love.filesystem]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Write data to a file}}
 
{{#set:Description=Write data to a file}}

Revision as of 14:37, 29 October 2010

Write data to a file

Function

Synopsis

success = love.filesystem.write( name, data, size )

Arguments

string name
The name (and path) of the file
string data
The data that should be written to the file
number size (all)
How many bytes to write

Returns

boolean success
If the operation was successful

Notes

If you are getting the error message "Could not set write directory", try setting the save directory. This is done either with love.filesystem.setIdentity or by setting the identity field in love.conf (only available with love 0.7 or higher).

See Also