current and parent dots.

For the Compleat Fan
Locked
tom
Posts: 168
Joined: Wed Jul 14, 2004 10:32 pm

current and parent dots.

Post by tom »

I thought this might sort of go along with the absolute path name thread, so I'll throw it out there. I am having fits with the ".." and "." that "directory" returns with the directory contents.

the show-tree function gets around it with the top-level directory with (!=nde ".")(!=nde ".."), but still returns the silly dots with subdirectories. How can I be rid of them? The nde thing looks messy, and I can't ge it to work right. is there another way? how 'bout a version of "directory" that does not show current and parent?

thanks...

-tom

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

Luckily directory can take wildcards, so you should be able to specify that you don't want anything starting with dots:

Something like this:

Code: Select all

(directory "./" "[^.\*]" 0)
- perhaps experiment till you get the right regex syntax! ;-)

Locked