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 536, Fri Feb 18 16:51:54 2000 UTC revision 537, Fri Feb 18 17:20:16 2000 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 fileopener' n =
21                (if fileExists n then (F.remove n handle _ => ()) else ();
22                 fileopener n)
23          fun mkDir d =          fun mkDir d =
24              F.mkDir d handle exn => (if fileExists d then () else raise exn)              F.mkDir d handle exn => (if fileExists d then () else raise exn)
25          fun generic (maker, pmaker, p) =          fun generic (maker, pmaker, p) =
# Line 40  Line 43 
43              (Say.vsay ["[creating directory ", dir, " ...]\n"];              (Say.vsay ["[creating directory ", dir, " ...]\n"];
44               makedirs dir)               makedirs dir)
45      in      in
46          generic (fileopener, advertisemakedirs, p)          generic (fileopener', advertisemakedirs, p)
47      end      end
48    
49      val openTextOut = openOut TextIO.openOut      val openTextOut = openOut TextIO.openOut

Legend:
Removed from v.536  
changed lines
  Added in v.537

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