Created
March 13, 2014 20:05
-
-
Save xintron/9535854 to your computer and use it in GitHub Desktop.
Fetch process directories
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getProcessDirectories = getDirectoryContents procPath >>= | |
filterM (doesDirectoryExist . (++) procPath) . filter (all isNumber) >>= | |
mapM (return . (++) procPath) | |
where | |
procPath = "/proc/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment