FunctionPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
Code change since the initial 10.0 release.
9.0 version

file-directory-p

Arguments: pathname &key (follow-symbolic-links t)

Incompatible change in release 10.1: file-directory-p will signal an error if the argument pathname does not name a file or directory. In releases prior to 10.1, nil was returned when pathname did not exist. (nil was and is also returned when pathname exists but names a file rather than a directory.)

Returns t if pathname names a directory and nil if it names a file. nil is also returned if pathname does not exist.

The behavior when the pathname argument names a symbolic link depends on the follow-symbolic-links argument. When true (the default), symbolic links are followed and t or nil is returned as the resolved link is or is not a directory. When follow-symbolic-links is nil and pathname names a symbolic link, nil is returned regardless of what the link resolves to (since pathname is a symbolic link, not a directory).

Symbolic link example

;; Suppose we have:
$ ls -ld foo tmp
lrwxrwxrwx  1 ueer ftp    3 Feb  4 14:48 foo -< tmp/
drwxr-xr-x. 7 user ftp 4096 Feb  1 12:47 tmp/
$ 

;; In Lisp we have:
;;
cl-user(3): (file-directory-p "foo" :follow-symbolic-links nil)
nil
cl-user(4): (file-directory-p "foo" :follow-symbolic-links t)
t
;; :follow-symbolic-links defaults to t:
cl-user(5): (file-directory-p "foo") 
t

Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 9.0 page.
Created 2015.5.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
Code change since the initial 10.0 release.
9.0 version