فهرست منبع

Merge pull request #88758 from AThousandShips/file_doc

Clarify behavior of opening a new file in `FileAccess`
Rémi Verschelde 1 سال پیش
والد
کامیت
43dce97a64
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      doc/classes/FileAccess.xml

+ 2 - 0
doc/classes/FileAccess.xml

@@ -517,12 +517,14 @@
 		</constant>
 		</constant>
 		<constant name="WRITE" value="2" enum="ModeFlags">
 		<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.
 			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>
 		<constant name="READ_WRITE" value="3" enum="ModeFlags">
 		<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.
 			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>
 		<constant name="WRITE_READ" value="7" enum="ModeFlags">
 		<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.
 			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>
 		<constant name="COMPRESSION_FASTLZ" value="0" enum="CompressionMode">
 		<constant name="COMPRESSION_FASTLZ" value="0" enum="CompressionMode">
 			Uses the [url=https://fastlz.org/]FastLZ[/url] compression method.
 			Uses the [url=https://fastlz.org/]FastLZ[/url] compression method.