Skip to content

Instantly share code, notes, and snippets.

@xintron
Created March 13, 2014 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xintron/9535854 to your computer and use it in GitHub Desktop.
Save xintron/9535854 to your computer and use it in GitHub Desktop.
Fetch process directories
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