summaryrefslogtreecommitdiff
path: root/doc/classes/File.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/File.xml')
-rw-r--r--doc/classes/File.xml31
1 files changed, 21 insertions, 10 deletions
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index c9a8f18116..30da143f88 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="File" inherits="Reference" category="Core" version="3.1">
+<class name="File" inherits="Reference" category="Core" version="3.2">
<brief_description>
Type to handle file reading and writing operations.
</brief_description>
@@ -24,8 +24,6 @@
<tutorials>
<link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/filesystem.html</link>
</tutorials>
- <demos>
- </demos>
<methods>
<method name="close">
<return type="void">
@@ -84,6 +82,7 @@
</return>
<description>
Returns the whole file as a [String].
+ Text is interpreted as being UTF-8 encoded.
</description>
</method>
<method name="get_buffer" qualifiers="const">
@@ -102,6 +101,7 @@
</argument>
<description>
Returns the next value of the file in CSV (Comma Separated Values) format. You can pass a different delimiter to use other than the default "," (comma), it should be one character long.
+ Text is interpreted as being UTF-8 encoded.
</description>
</method>
<method name="get_double" qualifiers="const">
@@ -137,6 +137,7 @@
</return>
<description>
Returns the next line of the file as a [String].
+ Text is interpreted as being UTF-8 encoded.
</description>
</method>
<method name="get_md5" qualifiers="const">
@@ -162,6 +163,7 @@
</return>
<description>
Returns a [String] saved in Pascal format from the file.
+ Text is interpreted as being UTF-8 encoded.
</description>
</method>
<method name="get_path" qualifiers="const">
@@ -204,8 +206,11 @@
<method name="get_var" qualifiers="const">
<return type="Variant">
</return>
+ <argument index="0" name="allow_objects" type="bool" default="false">
+ </argument>
<description>
- Returns the next [Variant] value from the file.
+ Returns the next [Variant] value from the file. When [code]allow_objects[/code] is [code]true[/code] decoding objects is allowed.
+ [b]WARNING:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution).
</description>
</method>
<method name="is_open" qualifiers="const">
@@ -220,7 +225,7 @@
</return>
<argument index="0" name="path" type="String">
</argument>
- <argument index="1" name="flags" type="int">
+ <argument index="1" name="flags" type="int" enum="File.ModeFlags">
</argument>
<description>
Opens the file for writing or reading, depending on the flags.
@@ -231,9 +236,9 @@
</return>
<argument index="0" name="path" type="String">
</argument>
- <argument index="1" name="mode_flags" type="int">
+ <argument index="1" name="mode_flags" type="int" enum="File.ModeFlags">
</argument>
- <argument index="2" name="compression_mode" type="int" default="0">
+ <argument index="2" name="compression_mode" type="int" enum="File.CompressionMode" default="0">
</argument>
<description>
Opens a compressed file for reading or writing. Use COMPRESSION_* constants to set [code]compression_mode[/code].
@@ -244,7 +249,7 @@
</return>
<argument index="0" name="path" type="String">
</argument>
- <argument index="1" name="mode_flags" type="int">
+ <argument index="1" name="mode_flags" type="int" enum="File.ModeFlags">
</argument>
<argument index="2" name="key" type="PoolByteArray">
</argument>
@@ -257,7 +262,7 @@
</return>
<argument index="0" name="path" type="String">
</argument>
- <argument index="1" name="mode_flags" type="int">
+ <argument index="1" name="mode_flags" type="int" enum="File.ModeFlags">
</argument>
<argument index="2" name="pass" type="String">
</argument>
@@ -337,6 +342,7 @@
</argument>
<description>
Store the given [PoolStringArray] in the file as a line formatted in the CSV (Comma Separated Values) format. You can pass a different delimiter to use other than the default "," (comma), it should be one character long.
+ Text will be encoded as UTF-8.
</description>
</method>
<method name="store_double">
@@ -364,6 +370,7 @@
</argument>
<description>
Stores the given [String] as a line in the file.
+ Text will be encoded as UTF-8.
</description>
</method>
<method name="store_pascal_string">
@@ -373,6 +380,7 @@
</argument>
<description>
Stores the given [String] as a line in the file in Pascal format (i.e. also store the length of the string).
+ Text will be encoded as UTF-8.
</description>
</method>
<method name="store_real">
@@ -391,6 +399,7 @@
</argument>
<description>
Stores the given [String] in the file.
+ Text will be encoded as UTF-8.
</description>
</method>
<method name="store_var">
@@ -398,8 +407,10 @@
</return>
<argument index="0" name="value" type="Variant">
</argument>
+ <argument index="1" name="full_objects" type="bool" default="false">
+ </argument>
<description>
- Stores any Variant value in the file.
+ Stores any Variant value in the file. When [code]full_objects[/code] is [code]true[/code] encoding objects is allowed (and can potentially include code).
</description>
</method>
</methods>