summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-03-05 23:44:36 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-03-05 23:44:36 +0100
commit43dce97a64d7411b13502981c45460c03e2176b1 (patch)
treed0f12666d95398f309c5c9c72eace9b31f1d4e1a
parent0975e2941c0ac82073b7c9ce4f0ded4a16fe70ef (diff)
parenta775d8bf5abdde5c1b5106dfa3686deb559eee62 (diff)
downloadredot-engine-43dce97a64d7411b13502981c45460c03e2176b1.tar.gz
Merge pull request #88758 from AThousandShips/file_doc
Clarify behavior of opening a new file in `FileAccess`
-rw-r--r--doc/classes/FileAccess.xml2
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/classes/FileAccess.xml b/doc/classes/FileAccess.xml
index df8ebc12fa..2abd9974ca 100644
--- a/doc/classes/FileAccess.xml
+++ b/doc/classes/FileAccess.xml
@@ -517,12 +517,14 @@
</constant>
<constant name="WRITE" value="2" enum="ModeFlags">
Opens the file for write operations. The file is created if it does not exist, and truncated if it does.
+ [b]Note:[/b] When creating a file it must be in an already existing directory. To recursively create directories for a file path, see [method DirAccess.make_dir_recursive]).
</constant>
<constant name="READ_WRITE" value="3" enum="ModeFlags">
Opens the file for read and write operations. Does not truncate the file. The cursor is positioned at the beginning of the file.
</constant>
<constant name="WRITE_READ" value="7" enum="ModeFlags">
Opens the file for read and write operations. The file is created if it does not exist, and truncated if it does. The cursor is positioned at the beginning of the file.
+ [b]Note:[/b] When creating a file it must be in an already existing directory. To recursively create directories for a file path, see [method DirAccess.make_dir_recursive]).
</constant>
<constant name="COMPRESSION_FASTLZ" value="0" enum="CompressionMode">
Uses the [url=https://fastlz.org/]FastLZ[/url] compression method.