hpath-io-0.10.1: High-level IO operations on files/directories

System.Posix.Directory.Traversals

Description

Traversal and read operations on directories.

Synopsis

# Documentation

Gets all directory contents (not recursively).

Like getDirectoryContents except for a file descriptor.

To avoid complicated error checks, the file descriptor is always closed, even if fdOpendir fails. Usually, this only happens on successful fdOpendir and after the directory stream is closed. Also see the manpage of fdopendir(3) for more details.

Get all files from a directory and its subdirectories.

Upon entering a directory, allDirectoryContents will get all entries strictly. However the returned list is lazy in that directories will only be accessed on demand.

Follows symbolic links for the input dir.

Get all files from a directory and its subdirectories strictly.

Follows symbolic links for the input dir.

traverseDirectory :: (s -> RawFilePath -> IO s) -> s -> RawFilePath -> IO s Source #

Recursively apply the action to the parent directory and all files/subdirectories.

This function allows for memory-efficient traversals.

Follows symbolic links for the input dir.

Binding to fdopendir(3).

return the canonicalized absolute pathname

like canonicalizePath, but uses realpath(3)