unix-2.3.0.1: POSIX functionalitySource codeContentsIndex
System.Posix.Directory
Portabilitynon-portable (requires POSIX)
Stabilityprovisional
Maintainerlibraries@haskell.org
Contents
Creating and removing directories
Reading directories
The working dirctory
Description
POSIX directory support
Synopsis
createDirectory :: FilePath -> FileMode -> IO ()
removeDirectory
data DirStream
openDirStream :: FilePath -> IO DirStream
readDirStream :: DirStream -> IO FilePath
rewindDirStream :: DirStream -> IO ()
closeDirStream :: DirStream -> IO ()
data DirStreamOffset
tellDirStream :: DirStream -> IO DirStreamOffset
seekDirStream :: DirStream -> DirStreamOffset -> IO ()
getWorkingDirectory :: IO FilePath
changeWorkingDirectory :: FilePath -> IO ()
changeWorkingDirectoryFd :: Fd -> IO ()
Creating and removing directories
createDirectory :: FilePath -> FileMode -> IO ()Source
createDirectory dir mode calls mkdir to create a new directory, dir, with permissions based on mode.
removeDirectory
Reading directories
data DirStream Source
openDirStream :: FilePath -> IO DirStreamSource
openDirStream dir calls opendir to obtain a directory stream for dir.
readDirStream :: DirStream -> IO FilePathSource
readDirStream dp calls readdir to obtain the next directory entry (struct dirent) for the open directory stream dp, and returns the d_name member of that structure.
rewindDirStream :: DirStream -> IO ()Source
rewindDirStream dp calls rewinddir to reposition the directory stream dp at the beginning of the directory.
closeDirStream :: DirStream -> IO ()Source
closeDirStream dp calls closedir to close the directory stream dp.
data DirStreamOffset Source
tellDirStream :: DirStream -> IO DirStreamOffsetSource
seekDirStream :: DirStream -> DirStreamOffset -> IO ()Source
The working dirctory
getWorkingDirectory :: IO FilePathSource
getWorkingDirectory calls getcwd to obtain the name of the current working directory.
changeWorkingDirectory :: FilePath -> IO ()Source
changeWorkingDirectory dir calls chdir to change the current working directory to dir.
changeWorkingDirectoryFd :: Fd -> IO ()Source
Produced by Haddock version 0.9