From a775d8bf5abdde5c1b5106dfa3686deb559eee62 Mon Sep 17 00:00:00 2001
From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Date: Sat, 24 Feb 2024 12:09:34 +0100
Subject: [PATCH] Clarify behavior of opening a new file in `FileAccess`
The containing directory must exist for this to succeed.
---
doc/classes/FileAccess.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/doc/classes/FileAccess.xml b/doc/classes/FileAccess.xml
index df8ebc12fa8..2abd9974ca5 100644
--- a/doc/classes/FileAccess.xml
+++ b/doc/classes/FileAccess.xml
@@ -517,12 +517,14 @@
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]).
Opens the file for read and write operations. Does not truncate the file. The cursor is positioned at the beginning of the file.
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]).
Uses the [url=https://fastlz.org/]FastLZ[/url] compression method.