save grid to custom format
This commit is contained in:
@@ -51,7 +51,13 @@ struct
|
||||
|
||||
fun loadSquares (path, inputMailbox) = ()
|
||||
|
||||
fun saveSquares squares = ()
|
||||
fun saveSquares squaresString =
|
||||
let
|
||||
val io = TextIO.openOut filename
|
||||
val () = TextIO.output (io, squaresString)
|
||||
in
|
||||
TextIO.closeOut io
|
||||
end
|
||||
|
||||
fun getDirList (dir, acc, rootPath) =
|
||||
case OS.FileSys.readDir dir of
|
||||
@@ -87,7 +93,7 @@ struct
|
||||
let
|
||||
val _ =
|
||||
case Mailbox.recv fileMailbox of
|
||||
SAVE_SQUARES triangles => saveSquares triangles
|
||||
SAVE_SQUARES str => saveSquares str
|
||||
| LOAD_SQUARES => loadSquares (filename, inputMailbox)
|
||||
| EXPORT_SQUARES triangles => exportSquares triangles
|
||||
| LOAD_FILES path => loadFiles (path, inputMailbox)
|
||||
|
||||
Reference in New Issue
Block a user