On Sun, 5 Jan 2014 14:37:08 -0700 Matthew Flatt <mfl...@cs.utah.edu> wrote:
> At Sun, 5 Jan 2014 21:45:59 +0100, Manfred Lotz wrote: > > This might be a stupid question. But how do I find out in Racket if > > a file is a socket or a haracter resp. block device file. > > I don't think any functions currently provide that information. (The > only related function that comes to mind is `terminal-port?`, and even > that function works on ports instead of files.) > Oh, that's really bad. When testing my file duplicate finder one of my test cases is to create a socket, a pipe, a character device and a block device file. My racket program gets a system error: No such device or address; errno=6 when dealing with a socket. Or if it is a pipe then it waits for input. I think functionality should be added in Racket. What's about something like this? socket-exists pipe-exists block-device-exists character-device-exists -- Manfred -- Manfred ____________________ Racket Users list: http://lists.racket-lang.org/users