You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns a <ahref="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_f.htm#fresh">fresh</a> list of pathnames corresponding to the truenames of
170
+
<p>
171
+
Returns a <ahref="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_f.htm#fresh">fresh</a> list of pathnames corresponding to
171
172
all files within the directory named by the non-wild <ahref="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_p.htm#pathname_designator">pathname designator</a><code><i>dirname</i></code>. The pathnames of sub-directories are returned in
172
173
<em>directory form</em> - see <ahref="#pathname-as-directory"><code>PATHNAME-AS-DIRECTORY</code></a>.
174
+
</p>
175
+
<p>
176
+
If <code><i>follow-symlinks</i></code> is true (which is the
177
+
default), then the returned list contains truenames (symlinks will
178
+
be resolved) which essentially means that it might also return files
179
+
from <b>outside</b> the directory. This works on all platforms.
180
+
</p>
181
+
<p>
182
+
When <code><i>follow-symlinks</i></code> is <code>NIL</code>, it should return the actual directory
183
+
contents, which might include symlinks. (This is currently implemented only on SBCL and CCL.)
<br><aclass=nonename="walk-directory"><b>walk-directory</b><i> dirname fn <tt>&key</tt> directories if-does-not-exist test follow-symlinks</i> => |</a>
177
189
178
190
<blockquote><br>
191
+
<p>
179
192
Recursively applies the function designated by the <ahref="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_f.htm#function_designator">function
180
193
designator</a><code><i>fn</i></code> to all files within the directory named
181
194
by the non-wild <ahref="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_p.htm#pathname_designator">pathname
@@ -190,17 +203,33 @@ <h2>CL-FAD - A portable pathname library for Common Lisp</h2>
190
203
directory's content will be skipped. <code><i>if-does-not-exist</i></code> must
191
204
be one of <code>:ERROR</code> or <code>:IGNORE</code> where <code>:ERROR</code>
192
205
(the default) means that an error will be signaled if the directory <code><i>dirname</i></code>
193
-
does not exist. </blockquote>
206
+
does not exist.
207
+
</p>
208
+
<p>
209
+
If <code><i>follow-symlinks</i></code> is true (which is
210
+
the default), then your callback will receive truenames. Otherwise
211
+
you should get the actual directory contents, which might include
212
+
symlinks. This might not be supported on all platforms. See
Recursively deletes all files and directories within the directory
200
223
designated by the non-wild <ahref="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_p.htm#pathname_designator">pathname designator</a><code><i>dirname</i></code> including
201
224
<code><i>dirname</i></code> itself. <code><i>if-does-not-exist</i></code> must be one of <code>:ERROR</code> or <code>:IGNORE</code>
202
225
where <code>:ERROR</code> (the default) means that an error will be signaled if the directory
203
226
<code><i>dirname</i></code> does not exist.
227
+
</p>
228
+
<p>
229
+
<b>Warning:</b> this function <em>might</em> remove files from outside the
230
+
directory, if the directory that you are deleting contains links to
231
+
external files. This is currently fixed for SBCL and CCL.
0 commit comments