Przeglądaj źródła

Merge pull request #9908 from Calinou/file-paths-string-methods

Document file path String methods in File paths in Godot projects
Max Hilbrunner 1 rok temu
rodzic
commit
be73f38b3f
1 zmienionych plików z 17 dodań i 0 usunięć
  1. 17 0
      tutorials/io/data_paths.rst

+ 17 - 0
tutorials/io/data_paths.rst

@@ -25,6 +25,23 @@ This makes it possible to work with paths returned by other Windows
 applications. We still recommend using only forward slashes in your own code to
 guarantee that everything will work as intended.
 
+.. tip::
+
+    The String class offers over a dozen methods to work with strings that represent file paths:
+
+    - :ref:`String.filecasecmp_to() <class_String_method_filecasecmp_to>`
+    - :ref:`String.filenocasecmp_to() <class_String_method_filenocasecmp_to>`
+    - :ref:`String.get_base_dir() <class_String_method_get_base_dir>`
+    - :ref:`String.get_basename() <class_String_method_get_basename>`
+    - :ref:`String.get_extension() <class_String_method_get_extension>`
+    - :ref:`String.get_file() <class_String_method_get_file>`
+    - :ref:`String.is_absolute_path() <class_String_method_is_absolute_path>`
+    - :ref:`String.is_relative_path() <class_String_method_is_relative_path>`
+    - :ref:`String.is_valid_filename() <class_String_method_is_valid_filename>`
+    - :ref:`String.path_join() <class_String_method_path_join>`
+    - :ref:`String.simplify_path() <class_String_method_simplify_path>`
+    - :ref:`String.validate_filename() <class_String_method_validate_filename>`
+
 Accessing files in the project folder (``res://``)
 --------------------------------------------------