Open the file for write, read or append.
== Function ==
=== Synopsis ===
<source lang="lua">
ok, err = File:open( mode )
</source>
=== Arguments ===
{{param|FileMode|mode|The mode to open the file in.}}
=== Returns ===
{{param|boolean|ok|True on success, false otherwise.}}
{{param|string|err|The error string if an error occurred.}}
=== 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 ==
* [[parent::File]]
* [[FileMode]]
[[Category:Functions]]
{{#set:Description=Open the file for write, read or append.}}
{{#set:Since=000}}
== Other Languages ==
{{i18n|(File):open}}