Page 1 of 1

Get a directory list without symlinks

Posted: Tue Sep 08, 2015 3:22 pm
by Xixo
Hi all.
Probabily a simple problem for you (I hope!).
I'm tryng to get a list from directory() without symlinks.
I mean only folders and real files.
I look around with no luck.
Is it possible?
Thanks in advance for any help!

Xixo

Re: Get a directory list without symlinks

Posted: Tue Sep 08, 2015 4:13 pm
by Xixo
Found:

http://www.newlisp.org/index.cgi?page=Code_Snippets

(define (link? path-name)
(= 0120000 (& (file-info path-name 1) 0120000)))

Sorry for the noise!

X.