reference/filesystem/functions/unlink.xml
ea62fb83196997032641b50fe44420305466195e
...
...
@@ -11,7 +11,7 @@
11
11
<methodsynopsis>
12
12
<type>bool</type><methodname>unlink</methodname>
13
13
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
14
-
<methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam>
14
+
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>context</parameter><initializer>&null;</initializer></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
17
Deletes <parameter>filename</parameter>. Similar to the Unix C unlink()
...
...
@@ -30,6 +30,10 @@
30
30
<para>
31
31
Path to the file.
32
32
</para>
33
+
<para>
34
+
If the file is a symlink, the symlink will be deleted. On Windows, to delete
35
+
a symlink to a directory, <function>rmdir</function> has to be used instead.
36
+
</para>
33
37
</listitem>
34
38
</varlistentry>
35
39
<varlistentry>
...
...
@@ -49,6 +53,31 @@
49
53
</para>
50
54
</refsect1>
51
55

56
+
<refsect1 role="changelog">
57
+
&reftitle.changelog;
58
+
<informaltable>
59
+
<tgroup cols="2">
60
+
<thead>
61
+
<row>
62
+
<entry>&Version;</entry>
63
+
<entry>&Description;</entry>
64
+
</row>
65
+
</thead>
66
+
<tbody>
67
+
<row>
68
+
<entry>7.3.0</entry>
69
+
<entry>
70
+
On Windows, it is now possible to <function>unlink</function> files with
71
+
handles in use, while formerly that would fail. However, it is still not
72
+
possible to re-create the unlinked file, until all handles to it have been
73
+
closed.
74
+
</entry>
75
+
</row>
76
+
</tbody>
77
+
</tgroup>
78
+
</informaltable>
79
+
</refsect1>
80
+

52
81
<refsect1 role="examples">
53
82
&reftitle.examples;
54
83
<para>
55
84