Noticed a minor issue in the implementation of OS.FileSys.readDir,
According to sml-family
readDir filters out the names corresponding to the current and parent arcs.
I had not quite figured out how to generate the whole .ans file, etc
(* Result: FAIL *)
(* Test OS.FileSys.readDir, should return false. *)
fun hasParentOrCurrentArc() =
let val cwd = OS.FileSys.openDir(OS.Path.currentArc)
fun hasParentOrCurrentArc(d, flag) =
let val entry = OS.FileSys.readDir(d)
fun check(entry) =
String.compare(entry, OS.Path.parentArc) = General.EQUAL
orelse String.compare(entry, OS.Path.currentArc) = General.EQUAL
fun ent (SOME entry, false) = hasParentOrCurrentArc(d, check(entry))
| ent (SOME entry, true) = true
| ent (NONE, flag) = flag
in ent (entry, flag)
end
in hasParentOrCurrentArc(cwd, false)
end
val a = hasParentOrCurrentArc();
Noticed a minor issue in the implementation of OS.FileSys.readDir,
According to sml-family
I had not quite figured out how to generate the whole .ans file, etc