ReadFile

From OxeyeWiki

Revision as of 18:22, 7 February 2010 by Jeb (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
DaisyMoon File Objects
The ReadFile class will open a binary file for reading.

Example


   local path = daisy.getUserFolderPath("")
   local file = ReadFile(path .. filename)

   if not file:isOk() then
      print("Unable to open " .. filename)
      return
   end

   local fileVersion = file:readInt()
   playerName = file:readString()
   -- ... and so on ...

   file:close()

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox