38 |
(* The open?Out functions automagically create any necessary directories |
(* The open?Out functions automagically create any necessary directories |
39 |
* and announce this activity via their string consumer argument. *) |
* and announce this activity via their string consumer argument. *) |
40 |
val openTextIn : t -> TextIO.instream |
val openTextIn : t -> TextIO.instream |
41 |
val openTextOut : (string -> unit) -> t -> TextIO.outstream |
val openTextOut : t -> TextIO.outstream |
42 |
val openBinIn : t -> BinIO.instream |
val openBinIn : t -> BinIO.instream |
43 |
val openBinOut : (string -> unit) -> t -> BinIO.outstream |
val openBinOut : t -> BinIO.outstream |
44 |
end |
end |
45 |
|
|
46 |
structure AbsPath :> ABSPATH = struct |
structure AbsPath :> ABSPATH = struct |
273 |
val tstamp = tstamp0 TStamp.TSTAMP |
val tstamp = tstamp0 TStamp.TSTAMP |
274 |
val stabletstamp = tstamp0 TStamp.STABLETSTAMP |
val stabletstamp = tstamp0 TStamp.STABLETSTAMP |
275 |
|
|
276 |
fun openOut fileopener (say: string -> unit) ap = let |
fun openOut fileopener ap = let |
277 |
val p = name ap |
val p = name ap |
278 |
fun generic (maker, pmaker, p) = |
fun generic (maker, pmaker, p) = |
279 |
maker p |
maker p |
285 |
end |
end |
286 |
fun makedirs dir = generic (F.mkDir, makedirs, dir) |
fun makedirs dir = generic (F.mkDir, makedirs, dir) |
287 |
fun advertisemakedirs dir = |
fun advertisemakedirs dir = |
288 |
(say (concat ["[creating directory ", dir, " ...]\n"]); |
(Say.vsay (concat ["[creating directory ", dir, " ...]\n"]); |
289 |
makedirs dir) |
makedirs dir) |
290 |
in |
in |
291 |
generic (fileopener, advertisemakedirs, p) |
generic (fileopener, advertisemakedirs, p) |