unix-2.8.4.0: POSIX functionality
Safe HaskellSafe-Inferred
LanguageHaskell2010

System.Posix.Directory.Fd

Synopsis

Documentation

unsafeOpenDirStreamFd :: Fd -> IO DirStream Source #

Call fdopendir to obtain a directory stream for fd. fd must not be otherwise used after this.

On success, it is owned by the returned DirStream, which should be closed via closeDirStream when no longer needed. On error, the file descriptor is automatically closed and then an exception is thrown. There is no code path in which the file descriptor remains open and yet not owned by a returned DirStream.

The input file descriptor must not have been used with threadWaitRead or threadWaitWrite.