Reputation: 39
How can we identify whether given File is a named pipe? Any way to use same code for both Linux and Windows.
Upvotes: 3
Views: 1094
Reputation: 17707
You may have some success with isOther() in the NIO2 Files API. This tells you that it is not a file, not a directory, and not a link. That leaves a named pipe, a unix socket, or a device..... perhaps that's enough for you?
Upvotes: 4