hmt-base-0.20: Haskell Music Theory Base
Safe HaskellSafe-Inferred
LanguageHaskell2010

Music.Theory.Directory.Find

Description

Directory functions using find system utility.

Synopsis

Documentation

dir_find :: FilePath -> FilePath -> IO [FilePath] Source #

Find files having indicated filename. This runs the system utility find, so is Unix only.

dir_find "DX7-ROM1A.syx" "/home/rohan/sw/hsc3-data/data/yamaha/"

dir_find_1 :: FilePath -> FilePath -> IO FilePath Source #

Require that exactly one file is located, else error.

dir_find_1 "DX7-ROM1A.syx" "/home/rohan/sw/hsc3-data/data/yamaha/"

dir_find_ext :: String -> FilePath -> IO [FilePath] Source #

Recursively find files having case-insensitive filename extension. This runs the system utility find, so is Unix only.

dir_find_ext ".syx" "/home/rohan/sw/hsc3-data/data/yamaha/"

dir_find_ext_rel :: String -> FilePath -> IO [FilePath] Source #

Post-process dir_find_ext to delete starting directory.

dir_find_ext_rel ".syx" "/home/rohan/sw/hsc3-data/data/yamaha/"

path_scan_recursively :: [FilePath] -> FilePath -> IO (Maybe FilePath) Source #

Scan each directory on path recursively for file. Stop once a file is located. Runs dir_find so is Unix only.

path_scan_recursively ["/home/rohan/sw/hmt-base"] "Directory.hs"

path_search_recursively :: [FilePath] -> FilePath -> IO [FilePath] Source #

Search each directory on path recursively for file. Runs dir_find so is Unix only.

path_search_recursively ["/home/rohan/sw"] "README.md"