Difference between revisions of "(File):open"

(Add note what to do when this function fails)
Line 9: Line 9:
 
=== Returns ===
 
=== Returns ===
 
{{param|boolean|ok|True on success, false otherwise.}}
 
{{param|boolean|ok|True on success, false otherwise.}}
 +
=== 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::File]]
 
* [[parent::File]]

Revision as of 14:37, 29 October 2010

Open the file for write, read or append.

Function

Synopsis

ok = File:open( mode )

Arguments

FileMode mode
The mode to open the file in.

Returns

boolean ok
True on success, false otherwise.

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

Other Languages