From 3faaef779e384e6283761906552c6c6c4eafb3dd Mon Sep 17 00:00:00 2001 From: cloudygoose Date: Fri, 5 Jun 2015 22:07:20 +0800 Subject: ... --- doc/nerv_io.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/nerv_io.md b/doc/nerv_io.md index a417aa8..07589df 100644 --- a/doc/nerv_io.md +++ b/doc/nerv_io.md @@ -30,6 +30,8 @@ In the file, a parameter object will be saved using a standard format. First is Write `p` into the file. `p:write` will be called. * __Param ChunkFile.read_chunk(ChunkFile self, string id, table global_conf)__ Read the __Param__ object by id `id` from the file `self`. It will be constructed using `__init(id, global_conf)`. `p:read` will be called. +* __void ChunkFile.close(ChunkFile self)__ +Close the opened file. ##Examples## * An example showing how to use __ChunkFile__ to store and read parameter objects. @@ -82,11 +84,13 @@ do f:write_chunk(exampleP1) f:write_chunk(exampleP2) + f:close() end do local f = nerv.ChunkFile('../tmp', 'r') local exampleP1 = f:read_chunk('exampleP1', global_conf) local exampleP2 = f:read_chunk('exampleP2', global_conf) + f:close() print(exampleP1.matrix) print(exampleP2.matrix) end -- cgit v1.2.3