Code: Select all
(set 'test-dir1 "C:/Program Files/programming")
(set 'test-dir2 "C:/Program Files/programming/")
(directory? test-dir1)
-->true
(directory? test-dir2)
-->true
(file? test-dir1)
-->true
(file? test-dir2)
-->nil
That suggests to me that I should see true? return true for any argument that directory? also returns true. But as we see above, this is not the behavior.This function will also return true for directories.
In addition, I'm not so sure that I like the idea of file? rerturning true for something that is not actually a file, especially when directory? is available.