haskus-system-0.6.0.0: Haskus system programming framework

Safe HaskellNone
LanguageHaskell2010

Haskus.Arch.Linux.FileSystem.Directory

Description

Directory

Synopsis

Documentation

sysGetDirectoryEntries :: MonadInIO m => Handle -> Word -> Flow m '[[DirectoryEntry], ErrorCode] Source #

getdents64 syscall

Linux doesn't provide a stateless API: the offset in the file (i.e. the iterator in the directory contents) is shared by everyone using the file descriptor...

TODO: propose a "pgetdents64" syscall for Linux with an additional offset (like pread, pwrite)

listDirectory :: MonadInIO m => Handle -> Flow m '[[DirectoryEntry], ErrorCode] Source #

Return the content of a directory

Warning: reading concurrently the same file descriptor returns mixed up results because of the stateful kernel interface