createDirectory dir mode calls mkdir to
create a new directory, dir, with permissions based on
mode.
Moduleunix-2.8.7.0Haskell2010
System.Posix.Directory
String-based POSIX directory support
- 2 types
- 12 values
- Packageunix-2.8.7.0
- Exports14
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceDirectory.hsc
Creating and removing directories
2 declarationsReading directories
9 declarationsopenDirStream dir calls opendir to obtain a
directory stream for dir.
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.
Note that this function returns an empty filepath if the end of the directory stream is reached. For a safer alternative use readDirStreamMaybe.
readDirStreamMaybe dp calls readdir to obtain the
next directory entry (struct dirent) for the open directory
stream dp. It returns the d_name member of that
structure wrapped in a Just d_name if an entry was read and Nothing if
the end of the directory stream was reached.
rewindDirStream dp calls rewinddir to reposition
the directory stream dp at the beginning of the directory.
closeDirStream dp calls closedir to close
the directory stream dp.
The working dirctory
3 declarationsgetWorkingDirectory calls getcwd to obtain the name
of the current working directory.
changeWorkingDirectory dir calls chdir to change
the current working directory to dir.