summaryrefslogtreecommitdiff
path: root/doc/classes/OS.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/OS.xml')
-rw-r--r--doc/classes/OS.xml23
1 files changed, 22 insertions, 1 deletions
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 059766656f..d920c45de4 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -216,6 +216,15 @@
Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path.
</description>
</method>
+ <method name="get_distribution_name" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the name of the distribution for Linux and BSD platforms (e.g. Ubuntu, Manjaro, OpenBSD, etc.).
+ Returns the same value as [method get_name] for stock Android ROMs, but attempts to return the custom ROM name for popular Android derivatives such as LineageOS.
+ Returns the same value as [method get_name] for other platforms.
+ [b]Note:[/b] This method is not supported on the web platform. It returns an empty string.
+ </description>
+ </method>
<method name="get_environment" qualifiers="const">
<return type="String" />
<param index="0" name="variable" type="String" />
@@ -430,6 +439,18 @@
Not to be confused with [method get_data_dir], which returns the [i]global[/i] (non-project-specific) user home directory.
</description>
</method>
+ <method name="get_version" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the exact production and build version of the operating system. This is different from the branded version used in marketing. This helps to distinguish between different releases of operating systems, including minor versions, and insider and custom builds.
+ For Windows, the major and minor version are returned, as well as the build number. For example, the returned string can look like [code]10.0.9926[/code] for a build of Windows 10, and it can look like [code]6.1.7601[/code] for a build of Windows 7 SP1.
+ For rolling distributions, such as Arch Linux, an empty string is returned.
+ For macOS and iOS, the major and minor version are returned, as well as the patch number.
+ For UWP, the device family version is returned.
+ For Android, the SDK version and the incremental build number are returned. If it's a custom ROM, it attempts to return its version instead.
+ [b]Note:[/b] This method is not supported on the web platform. It returns an empty string.
+ </description>
+ </method>
<method name="has_environment" qualifiers="const">
<return type="bool" />
<param index="0" name="variable" type="String" />
@@ -501,7 +522,7 @@
<return type="int" enum="Error" />
<param index="0" name="path" type="String" />
<description>
- Moves the file or directory to the system's recycle bin. See also [method Directory.remove].
+ Moves the file or directory to the system's recycle bin. See also [method DirAccess.remove].
The method takes only global paths, so you may need to use [method ProjectSettings.globalize_path]. Do not use it for files in [code]res://[/code] as it will not work in exported project.
[b]Note:[/b] If the user has disabled the recycle bin on their system, the file will be permanently deleted instead.
[codeblock]