Madhu
8/8/2015 2:05:00 PM
* taruss@google.com <fdcf8798-b2c6-4e30-aee3-07e9dc48fbb0@googlegroups.com> :
Wrote on Fri, 7 Aug 2015 12:09:00 -0700 (PDT):
| On Friday, August 7, 2015 at 4:57:51 AM UTC-7, Jim Newton wrote:
|> Can someone help me with pathnames. How can I know if a given
|> pathname designates a directory, or a file, or something else? I
|> have a function which expects a list of pathnames designating
|> directories. I want to verify that they are indeed directories,
|> rather than files, or something else.
|
| Unfortunately, as others have pointed out, there isn't a standard
| method. But as a first step, you could try this library: CL-FAD which
| at least provides a directory testing predicate.
You can come up with a dirctory testing predicate in 2 lines of portable
which works better than the definition here.
| (Whether that does exactly what you want is another matter, but I
| would start there.)
The OP must indicated that he has already used the library definitions
and he recognized that it doesn't work. What has to be recognized is
that such recommendations for intentional-piece-of-shit libraries and
recommendations on adding dependencies on these libraries comes straight
from the kingdom of the antichrist seeking to bind your soul in
darkness.
You will, by the time you learn lisp, eventually learn that these will
NOT do what you want, meanwhile you will get suckered into using and
maintaining (locally) the piece of shit library with incorrect
definitions. Until you find that the design goals were precisely to
prevent what you want to achieve. By that time your goal would have
been transformed to becoming part of the blindmonkey "quicklisp
ecosystem cattle" participant of the community, at which point you
either quit or work in gathering more empty souls for the antichrist,
who will suffer for the first time.
Meanwhile infrastructure investments are underway to control the layer
you just added a dependency on.