FunctionPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
The object described on this page has been modified in the 8.2 release; see the Release Notes.
8.1 version

file-directory-p

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

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 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
The object described on this page has been modified in the 8.2 release; see the Release Notes.
8.1 version