Thursday, 2 June 2016

Haskell: findExecutablesInDirectories: Search for an executable in given directories

System.Directory module provides findExecutablesInDirectories function, which takes a list of directories, file to search and returns a list of all occurrences that are executable.

Following is the signature of findExecutablesInDirectories function.
findExecutablesInDirectories :: [FilePath] -> String -> IO [FilePath]

Prelude System.Directory> findExecutablesInDirectories ["/usr/bin", "/Users/harikrishna_gurram", "/var"] "javac"
["/usr/bin/javac"]


Previous                                                 Next                                                 Home

No comments:

Post a Comment