Add symlink API support for Windows, expose symlink methods.

This commit is contained in:
bruvzg
2024-04-24 10:48:47 +03:00
parent 6118592c6d
commit fc948e87f6
4 changed files with 93 additions and 3 deletions

View File

@@ -94,6 +94,16 @@
Static version of [method copy]. Supports only absolute paths.
</description>
</method>
<method name="create_link">
<return type="int" enum="Error" />
<param index="0" name="source" type="String" />
<param index="1" name="target" type="String" />
<description>
Creates symbolic link between files or folders.
[b]Note:[/b] On Windows, this method works only if the application is running with elevated privileges or Developer Mode is enabled.
[b]Note:[/b] This method is implemented on macOS, Linux, and Windows.
</description>
</method>
<method name="current_is_dir" qualifiers="const">
<return type="bool" />
<description>
@@ -212,6 +222,14 @@
[b]Note:[/b] This method is implemented on macOS, Linux (for EXT4 and F2FS filesystems only) and Windows. On other platforms, it always returns [code]true[/code].
</description>
</method>
<method name="is_link">
<return type="bool" />
<param index="0" name="path" type="String" />
<description>
Returns [code]true[/code] if the file or directory is a symbolic link, directory junction, or other reparse point.
[b]Note:[/b] This method is implemented on macOS, Linux, and Windows.
</description>
</method>
<method name="list_dir_begin">
<return type="int" enum="Error" />
<description>
@@ -264,6 +282,14 @@
Returns [code]null[/code] if opening the directory failed. You can use [method get_open_error] to check the error that occurred.
</description>
</method>
<method name="read_link">
<return type="String" />
<param index="0" name="path" type="String" />
<description>
Returns target of the symbolic link.
[b]Note:[/b] This method is implemented on macOS, Linux, and Windows.
</description>
</method>
<method name="remove">
<return type="int" enum="Error" />
<param index="0" name="path" type="String" />