mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-05 14:10:19 +03:00
Sync classref with 4.6 branch
Lots of translations invalidated (fuzzied) as we just synced Weblate.
This commit is contained in:
@@ -111,7 +111,7 @@ Méthodes
|
||||
+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_access_time<class_FileAccess_method_get_access_time>`\ (\ file\: :ref:`String<class_String>`\ ) |static| |
|
||||
+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`get_as_text<class_FileAccess_method_get_as_text>`\ (\ skip_cr\: :ref:`bool<class_bool>` = false\ ) |const| |
|
||||
| :ref:`String<class_String>` | :ref:`get_as_text<class_FileAccess_method_get_as_text>`\ (\ ) |const| |
|
||||
+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_buffer<class_FileAccess_method_get_buffer>`\ (\ length\: :ref:`int<class_int>`\ ) |const| |
|
||||
+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
@@ -121,6 +121,12 @@ Méthodes
|
||||
+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`get_error<class_FileAccess_method_get_error>`\ (\ ) |const| |
|
||||
+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_extended_attribute<class_FileAccess_method_get_extended_attribute>`\ (\ file\: :ref:`String<class_String>`, attribute_name\: :ref:`String<class_String>`\ ) |static| |
|
||||
+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`get_extended_attribute_string<class_FileAccess_method_get_extended_attribute_string>`\ (\ file\: :ref:`String<class_String>`, attribute_name\: :ref:`String<class_String>`\ ) |static| |
|
||||
+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_extended_attributes_list<class_FileAccess_method_get_extended_attributes_list>`\ (\ file\: :ref:`String<class_String>`\ ) |static| |
|
||||
+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_file_as_bytes<class_FileAccess_method_get_file_as_bytes>`\ (\ path\: :ref:`String<class_String>`\ ) |static| |
|
||||
+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`get_file_as_string<class_FileAccess_method_get_file_as_string>`\ (\ path\: :ref:`String<class_String>`\ ) |static| |
|
||||
@@ -171,12 +177,18 @@ Méthodes
|
||||
+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`FileAccess<class_FileAccess>` | :ref:`open_encrypted_with_pass<class_FileAccess_method_open_encrypted_with_pass>`\ (\ path\: :ref:`String<class_String>`, mode_flags\: :ref:`ModeFlags<enum_FileAccess_ModeFlags>`, pass\: :ref:`String<class_String>`\ ) |static| |
|
||||
+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`remove_extended_attribute<class_FileAccess_method_remove_extended_attribute>`\ (\ file\: :ref:`String<class_String>`, attribute_name\: :ref:`String<class_String>`\ ) |static| |
|
||||
+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`resize<class_FileAccess_method_resize>`\ (\ length\: :ref:`int<class_int>`\ ) |
|
||||
+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`seek<class_FileAccess_method_seek>`\ (\ position\: :ref:`int<class_int>`\ ) |
|
||||
+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`seek_end<class_FileAccess_method_seek_end>`\ (\ position\: :ref:`int<class_int>` = 0\ ) |
|
||||
+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`set_extended_attribute<class_FileAccess_method_set_extended_attribute>`\ (\ file\: :ref:`String<class_String>`, attribute_name\: :ref:`String<class_String>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |static| |
|
||||
+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`set_extended_attribute_string<class_FileAccess_method_set_extended_attribute_string>`\ (\ file\: :ref:`String<class_String>`, attribute_name\: :ref:`String<class_String>`, data\: :ref:`String<class_String>`\ ) |static| |
|
||||
+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`set_hidden_attribute<class_FileAccess_method_set_hidden_attribute>`\ (\ file\: :ref:`String<class_String>`, hidden\: :ref:`bool<class_bool>`\ ) |static| |
|
||||
+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`set_read_only_attribute<class_FileAccess_method_set_read_only_attribute>`\ (\ file\: :ref:`String<class_String>`, ro\: :ref:`bool<class_bool>`\ ) |static| |
|
||||
@@ -241,7 +253,7 @@ Opens the file for read operations. The file cursor is positioned at the beginni
|
||||
|
||||
:ref:`ModeFlags<enum_FileAccess_ModeFlags>` **WRITE** = ``2``
|
||||
|
||||
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. If the file exists, it is truncated to zero length and its contents are cleared. Otherwise, it is created.
|
||||
|
||||
\ **Note:** When creating a file it must be in an already existing directory. To recursively create directories for a file path, see :ref:`DirAccess.make_dir_recursive()<class_DirAccess_method_make_dir_recursive>`.
|
||||
|
||||
@@ -259,7 +271,7 @@ Opens the file for read and write operations. Does not truncate the file. The fi
|
||||
|
||||
:ref:`ModeFlags<enum_FileAccess_ModeFlags>` **WRITE_READ** = ``7``
|
||||
|
||||
Opens the file for read and write operations. The file is created if it does not exist, and truncated if it does. The file cursor is positioned at the beginning of the file.
|
||||
Opens the file for read and write operations. If the file exists, it is truncated to zero length and its contents are cleared. Otherwise, it is created. The file cursor is positioned at the beginning of the file.
|
||||
|
||||
\ **Note:** When creating a file it must be in an already existing directory. To recursively create directories for a file path, see :ref:`DirAccess.make_dir_recursive()<class_DirAccess_method_make_dir_recursive>`.
|
||||
|
||||
@@ -611,12 +623,10 @@ Returns the last time the ``file`` was accessed in Unix timestamp format, or ``0
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **get_as_text**\ (\ skip_cr\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_FileAccess_method_get_as_text>`
|
||||
:ref:`String<class_String>` **get_as_text**\ (\ ) |const| :ref:`🔗<class_FileAccess_method_get_as_text>`
|
||||
|
||||
Returns the whole file as a :ref:`String<class_String>`. Text is interpreted as being UTF-8 encoded. This ignores the file cursor and does not affect it.
|
||||
|
||||
If ``skip_cr`` is ``true``, carriage return characters (``\r``, CR) will be ignored when parsing the UTF-8, so that only line feed characters (``\n``, LF) represent a new line (Unix convention).
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
@@ -681,6 +691,66 @@ Renvoie la dernière erreur qui est arrivée lors de l'exécution d'une opérati
|
||||
|
||||
----
|
||||
|
||||
.. _class_FileAccess_method_get_extended_attribute:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`PackedByteArray<class_PackedByteArray>` **get_extended_attribute**\ (\ file\: :ref:`String<class_String>`, attribute_name\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_FileAccess_method_get_extended_attribute>`
|
||||
|
||||
Reads the file extended attribute with name ``attribute_name`` as a byte array.
|
||||
|
||||
\ **Note:** This method is implemented on Linux, macOS, and Windows.
|
||||
|
||||
\ **Note:** Extended attributes support depends on the file system. Attributes will be lost when the file is moved between incompatible file systems.
|
||||
|
||||
\ **Note:** On Linux, only "user" namespace attributes are accessible, namespace prefix should not be included.
|
||||
|
||||
\ **Note:** On Windows, alternate data streams are used to store extended attributes.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_FileAccess_method_get_extended_attribute_string:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **get_extended_attribute_string**\ (\ file\: :ref:`String<class_String>`, attribute_name\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_FileAccess_method_get_extended_attribute_string>`
|
||||
|
||||
Reads the file extended attribute with name ``attribute_name`` as a UTF-8 encoded string.
|
||||
|
||||
\ **Note:** This method is implemented on Linux, macOS, and Windows.
|
||||
|
||||
\ **Note:** Extended attributes support depends on the file system. Attributes will be lost when the file is moved between incompatible file systems.
|
||||
|
||||
\ **Note:** On Linux, only "user" namespace attributes are accessible, namespace prefix should not be included.
|
||||
|
||||
\ **Note:** On Windows, alternate data streams are used to store extended attributes.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_FileAccess_method_get_extended_attributes_list:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`PackedStringArray<class_PackedStringArray>` **get_extended_attributes_list**\ (\ file\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_FileAccess_method_get_extended_attributes_list>`
|
||||
|
||||
Returns a list of file extended attributes.
|
||||
|
||||
\ **Note:** This method is implemented on Linux, macOS, and Windows.
|
||||
|
||||
\ **Note:** Extended attributes support depends on the file system. Attributes will be lost when the file is moved between incompatible file systems.
|
||||
|
||||
\ **Note:** On Linux, only "user" namespace attributes are accessible, namespace prefix should not be included.
|
||||
|
||||
\ **Note:** On Windows, alternate data streams are used to store extended attributes.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_FileAccess_method_get_file_as_bytes:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
@@ -739,7 +809,7 @@ Returns the next 16 bits from the file as a half-precision floating-point number
|
||||
|
||||
:ref:`bool<class_bool>` **get_hidden_attribute**\ (\ file\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_FileAccess_method_get_hidden_attribute>`
|
||||
|
||||
Returns ``true``, if file ``hidden`` attribute is set.
|
||||
Returns ``true`` if the **hidden** attribute is set on the file at the given path.
|
||||
|
||||
\ **Note:** This method is implemented on iOS, BSD, macOS, and Windows.
|
||||
|
||||
@@ -865,7 +935,7 @@ Returns the file cursor's position in bytes from the beginning of the file. This
|
||||
|
||||
:ref:`bool<class_bool>` **get_read_only_attribute**\ (\ file\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_FileAccess_method_get_read_only_attribute>`
|
||||
|
||||
Returns ``true``, if file ``read only`` attribute is set.
|
||||
Returns ``true`` if the **read only** attribute is set on the file at the given path.
|
||||
|
||||
\ **Note:** This method is implemented on iOS, BSD, macOS, and Windows.
|
||||
|
||||
@@ -905,7 +975,7 @@ Returns an SHA-256 :ref:`String<class_String>` representing the file at the give
|
||||
|
||||
:ref:`int<class_int>` **get_size**\ (\ file\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_FileAccess_method_get_size>`
|
||||
|
||||
Returns file size in bytes, or ``-1`` on error.
|
||||
Returns the size of the file at the given path, in bytes, or ``-1`` on error.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -917,7 +987,7 @@ Returns file size in bytes, or ``-1`` on error.
|
||||
|
||||
|bitfield|\[:ref:`UnixPermissionFlags<enum_FileAccess_UnixPermissionFlags>`\] **get_unix_permissions**\ (\ file\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_FileAccess_method_get_unix_permissions>`
|
||||
|
||||
Returns file UNIX permissions.
|
||||
Returns the UNIX permissions of the file at the given path.
|
||||
|
||||
\ **Note:** This method is implemented on iOS, Linux/BSD, and macOS.
|
||||
|
||||
@@ -1013,6 +1083,26 @@ Returns ``null`` if opening the file failed. You can use :ref:`get_open_error()<
|
||||
|
||||
----
|
||||
|
||||
.. _class_FileAccess_method_remove_extended_attribute:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Error<enum_@GlobalScope_Error>` **remove_extended_attribute**\ (\ file\: :ref:`String<class_String>`, attribute_name\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_FileAccess_method_remove_extended_attribute>`
|
||||
|
||||
Removes file extended attribute with name ``attribute_name``.
|
||||
|
||||
\ **Note:** This method is implemented on Linux, macOS, and Windows.
|
||||
|
||||
\ **Note:** Extended attributes support depends on the file system. Attributes will be lost when the file is moved between incompatible file systems.
|
||||
|
||||
\ **Note:** On Linux, only "user" namespace attributes are accessible, namespace prefix should not be included.
|
||||
|
||||
\ **Note:** On Windows, alternate data streams are used to store extended attributes.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_FileAccess_method_resize:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
@@ -1031,7 +1121,7 @@ Resizes the file to a specified length. The file must be open in a mode that per
|
||||
|
||||
|void| **seek**\ (\ position\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FileAccess_method_seek>`
|
||||
|
||||
Changes the file reading/writing cursor to the specified position (in bytes from the beginning of the file). This changes the value returned by :ref:`get_position()<class_FileAccess_method_get_position>`.
|
||||
Sets the file cursor to the specified position in bytes, from the beginning of the file. This changes the value returned by :ref:`get_position()<class_FileAccess_method_get_position>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -1043,9 +1133,49 @@ Changes the file reading/writing cursor to the specified position (in bytes from
|
||||
|
||||
|void| **seek_end**\ (\ position\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_FileAccess_method_seek_end>`
|
||||
|
||||
Changes the file reading/writing cursor to the specified position (in bytes from the end of the file). This changes the value returned by :ref:`get_position()<class_FileAccess_method_get_position>`.
|
||||
Sets the file cursor to the specified position in bytes, from the end of the file. This changes the value returned by :ref:`get_position()<class_FileAccess_method_get_position>`.
|
||||
|
||||
\ **Note:** This is an offset, so you should use negative numbers or the file cursor will be at the end of the file.
|
||||
\ **Note:** This is an offset, so you should use negative numbers otherwise the file cursor will be at the end of the file.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_FileAccess_method_set_extended_attribute:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Error<enum_@GlobalScope_Error>` **set_extended_attribute**\ (\ file\: :ref:`String<class_String>`, attribute_name\: :ref:`String<class_String>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |static| :ref:`🔗<class_FileAccess_method_set_extended_attribute>`
|
||||
|
||||
Writes file extended attribute with name ``attribute_name`` as a byte array.
|
||||
|
||||
\ **Note:** This method is implemented on Linux, macOS, and Windows.
|
||||
|
||||
\ **Note:** Extended attributes support depends on the file system. Attributes will be lost when the file is moved between incompatible file systems.
|
||||
|
||||
\ **Note:** On Linux, only "user" namespace attributes are accessible, namespace prefix should not be included.
|
||||
|
||||
\ **Note:** On Windows, alternate data streams are used to store extended attributes.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_FileAccess_method_set_extended_attribute_string:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Error<enum_@GlobalScope_Error>` **set_extended_attribute_string**\ (\ file\: :ref:`String<class_String>`, attribute_name\: :ref:`String<class_String>`, data\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_FileAccess_method_set_extended_attribute_string>`
|
||||
|
||||
Writes file extended attribute with name ``attribute_name`` as a UTF-8 encoded string.
|
||||
|
||||
\ **Note:** This method is implemented on Linux, macOS, and Windows.
|
||||
|
||||
\ **Note:** Extended attributes support depends on the file system. Attributes will be lost when the file is moved between incompatible file systems.
|
||||
|
||||
\ **Note:** On Linux, only "user" namespace attributes are accessible, namespace prefix should not be included.
|
||||
|
||||
\ **Note:** On Windows, alternate data streams are used to store extended attributes.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -1220,7 +1350,7 @@ Stores the given array of bytes in the file. This advances the file cursor by th
|
||||
|
||||
:ref:`bool<class_bool>` **store_csv_line**\ (\ values\: :ref:`PackedStringArray<class_PackedStringArray>`, delim\: :ref:`String<class_String>` = ","\ ) :ref:`🔗<class_FileAccess_method_store_csv_line>`
|
||||
|
||||
Store the given :ref:`PackedStringArray<class_PackedStringArray>` in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter ``delim`` to use other than the default ``","`` (comma). This delimiter must be one-character long.
|
||||
Stores the given :ref:`PackedStringArray<class_PackedStringArray>` in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter ``delim`` to use other than the default ``","`` (comma). This delimiter must be one-character long.
|
||||
|
||||
Text will be encoded as UTF-8. Returns ``true`` if the operation is successful.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user