Get a directory list without symlinks

Q&A's, tips, howto's

Get a directory list without symlinks

Postby Xixo » Tue Sep 08, 2015 3:22 pm

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
Xixo
 
Posts: 2
Joined: Tue Nov 18, 2014 8:54 pm

Re: Get a directory list without symlinks

Postby Xixo » Tue Sep 08, 2015 4:13 pm

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.
Xixo
 
Posts: 2
Joined: Tue Nov 18, 2014 8:54 pm


Return to newLISP in the real world

Who is online

Users browsing this forum: No registered users and 1 guest

cron