|
definition: |
createStructure :: String -> String -> ERD -> String -> String -> DirTree
-> IO ()
createStructure target_path resource_dir _ _ _
(ResourceFile fmode filename) = do
let infile = resource_dir </> filename
targetfile = target_path </> takeFileName filename
ifNotExistsDo targetfile $ do
putStrLn $ "Creating file '" ++ targetfile ++ "'..."
system $ "cp \"" ++ infile ++ "\" \"" ++ targetfile ++ "\""
setFileMode fmode targetfile
createStructure target_path resource_dir erd _ _
(ResourcePatchFile fmode filename patchfun) = do
let full_path = target_path </> filename
ifNotExistsDo full_path $ do
putStrLn ("Creating file '" ++ full_path ++ "'...")
cnt <- readFile (resource_dir </> filename)
let outfile = target_path </> filename
writeFile outfile (patchfun erd cnt)
setFileMode fmode outfile
createStructure target_path resource_dir erd erprogpath db_path
(Directory dirname subtree) = do
let full_path = target_path </> dirname
ifNotExistsDo full_path $ do
putStrLn $ "Creating directory '" ++ full_path ++ "'..."
createDirectory full_path
mapM_ (createStructure full_path resource_dir erd erprogpath db_path) subtree
createStructure target_path _ erd erprogpath db_path
(GeneratedFromERD generatorFunction) =
generatorFunction erprogpath erd target_path db_path
|
|
demand: |
argument 6 |
|
deterministic: |
deterministic operation |
|
documentation: |
Creates the structure of the source files of the new package. |
|
failfree: |
<FAILING> |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_,_,_,_,_,{ResourceFile}) |-> _ || (_,_,_,_,_,{ResourcePatchFile}) |-> _ || (_,_,_,_,_,{Directory}) |-> _ || (_,_,_,_,_,{GeneratedFromERD}) |-> _}
|
|
name: |
createStructure |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
String -> String -> Database.ERD.ERD -> String -> String -> DirTree -> Prelude.IO () |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |