Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/cm/util/autodir.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/util/autodir.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 354, Fri Jun 25 08:36:12 1999 UTC revision 376, Wed Jul 7 04:25:11 1999 UTC
# Line 17  Line 17 
17      fun fileExists n = F.access (n, []) handle _ => false      fun fileExists n = F.access (n, []) handle _ => false
18    
19      fun openOut fileopener p = let      fun openOut fileopener p = let
20            fun mkDir d = if fileExists d then () else F.mkDir d
21          fun generic (maker, pmaker, p) =          fun generic (maker, pmaker, p) =
22              maker p              maker p
23              handle exn => let              handle exn => let
24                  val { dir, ... } = P.splitDirFile p                  val dir = P.dir p
25              in              in
26                  if dir = "" orelse fileExists dir then raise exn                  if dir = "" orelse fileExists dir then raise exn
27                  else (pmaker dir; maker p)                  else (pmaker dir; maker p)
28              end              end
29          fun makedirs dir = generic (F.mkDir, makedirs, dir)          fun makedirs dir = generic (mkDir, makedirs, dir)
30          fun advertisemakedirs dir =          fun advertisemakedirs dir =
31              (Say.vsay ["[creating directory ", dir, " ...]\n"];              (Say.vsay ["[creating directory ", dir, " ...]\n"];
32               makedirs dir)               makedirs dir)

Legend:
Removed from v.354  
changed lines
  Added in v.376

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0