[racket] Racket v5.93

From: Manfred Lotz (manfred.lotz at arcor.de)
Date: Sat Feb 1 06:11:11 EST 2014

Hi Ryan,
I have even more wishes for the upcoming 6.0.

On Fri, 31 Jan 2014 18:40:43 -0500
Ryan Culpepper <ryanc at ccs.neu.edu> wrote:

> Racket v5.93 is now available from
> 
>    http://racket-lang.org/
> 

Some time ago I mentioned the file functions (like
file-exists?, ...) are incomplete not dealing with what does exist in
the wild.

I think it would be a good idea to add something like this:


 Function                 used flags                   
--------------------------------------------------
 link-exists?             S_IFLNK                 
 directory-exists?        S_IFDIR                 
 file-exists?             !S_IFDIR                
--------------------------------------------------
 regular-file-exists?     S_IFREG                 
 socket-exists?           S_IFSOCK                
 pipe-exists?             S_IFIFO                 
 block-device-exists      S_IFBLK                 
 character-device-exists  S_IFCHR                 
 special-file-exists      (and !S_IFDIR !S_IFREG) 
--------------------------------------------------

The first three exist already. The others do not.

The only function using lstat is link-exists?, all other functions
should use stat.


>From a unix point of view the implementation should be easy to do in
file.c. I don't use windows so that I have no clue how these functions
should behave there.


If this would be implemented I would be happy to test it, of course. 



-- 
Manfred







Posted on the users mailing list.