aboutsummaryrefslogtreecommitdiff
path: root/Tools/CodeGen/Thorn.m
diff options
context:
space:
mode:
authorshusa <shusa>2005-02-02 13:21:46 +0000
committershusa <shusa>2005-02-02 13:21:46 +0000
commit1098557134b7bf7e8f5eeed24a4e10d0676808de (patch)
tree1e618ce2ee27adbb360551c3a7c3f9fada954b1c /Tools/CodeGen/Thorn.m
parente9246dbd525db0db3063b669370b5b6d5bb590c7 (diff)
correct bug in SafeDelete and move to Helpers.m, move ensureDirectory to
Helpers.m : EnsureDirectory
Diffstat (limited to 'Tools/CodeGen/Thorn.m')
-rw-r--r--Tools/CodeGen/Thorn.m12
1 files changed, 3 insertions, 9 deletions
diff --git a/Tools/CodeGen/Thorn.m b/Tools/CodeGen/Thorn.m
index 71161e1..ecac4c3 100644
--- a/Tools/CodeGen/Thorn.m
+++ b/Tools/CodeGen/Thorn.m
@@ -45,7 +45,7 @@ Textual, TriggerGroups, Include};
EndPackage[];
-BeginPackage["Thorn`", "CodeGen`", "CalculationFunction`", "MapLookup`", "KrancGroups`"];
+BeginPackage["Thorn`", "CodeGen`", "CalculationFunction`", "MapLookup`", "KrancGroups`", "Helpers`"];
(* These functions are externally visible, and comprise the public
interface to this package. *)
@@ -74,12 +74,6 @@ Begin["`Private`"];
Miscellaneous definitions, could be moved elsewhere
------------------------------------------------------------------------ *)
-(* Create a directory if it does not exist already *)
-ensureDirectory[name_] :=
- If[FileType[name] == None,
- CreateDirectory[name]];
-
-
(* date, user, etc. *)
date[] := ToString[Date[][[3]]] <> "/" <>
ToString[Date[][[2]]] <> "/" <>
@@ -992,8 +986,8 @@ CreateThorn[thorn_] :=
Print["Creating thorns in directory ", thornDirectory];
- ensureDirectory[thornDirectory];
- ensureDirectory[sourceDirectory];
+ EnsureDirectory[thornDirectory];
+ EnsureDirectory[sourceDirectory];
GenerateFile[thornDirectory <> "/interface.ccl", lookup[thorn, Interface]];
GenerateFile[thornDirectory <> "/param.ccl", lookup[thorn, Param]];