Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function save(obj, objFilename)
- local path = system.pathForFile( objFilename .. ".txt", system.DocumentsDirectory )
- local file = io.open( path, "w+b" )
- file:write(obj)
- io.close( file )
- end
- local function load(loadFilename)
- print (loadFilename)
- local path = system.pathForFile( loadFilename, system.DocumentsDirectory )
- local file = io.open( path, "r" )
- if file then
- local contents = file:read( "*a" )
- return contents
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement