CurryInfo: spicey-4.2.0 / Spicey.SpiceUp.ifNotExistsDo

definition: Info
 
ifNotExistsDo :: String -> IO () -> IO ()
ifNotExistsDo path cmd = do
  fileExists <- doesFileExist path
  dirExists  <- doesDirectoryExist path
  if fileExists || dirExists
    then putStrLn $ "Skipping '" ++ path ++ "'..."
    else cmd
demand: Info
 no demanded arguments
deterministic: Info
 deterministic operation
documentation: Info
 
checks if given path exists (file or directory) and executes
given action if not
failfree: Info
 (_, _)
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {(_,_) |-> _}
name: Info
 ifNotExistsDo
precedence: Info
 no precedence defined
result-values: Info
 _
signature: Info
 String -> Prelude.IO () -> Prelude.IO ()
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 reducible on all ground data terms