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>
...
...
@@ -51,29 +55,27 @@
51
55

52
56
<refsect1 role="changelog">
53
57
&reftitle.changelog;
54
-
<para>
55
-
<informaltable>
56
-
<tgroup cols="2">
57
-
<thead>
58
-
<row>
59
-
<entry>&Version;</entry>
60
-
<entry>&Description;</entry>
61
-
</row>
62
-
</thead>
63
-
<tbody>
64
-
<row>
65
-
<entry>5.0.0</entry>
66
-
<entry>
67
-
As of PHP 5.0.0 <function>unlink</function> can also be used with
68
-
<emphasis>some</emphasis> URL wrappers. Refer to <xref
69
-
linkend="wrappers"/> for a listing of which wrappers support
70
-
<function>unlink</function>.
71
-
</entry>
72
-
</row>
73
-
</tbody>
74
-
</tgroup>
75
-
</informaltable>
76
-
</para>
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>
77
79
</refsect1>
78
80

79
81
<refsect1 role="examples">
80
82