ReadFile

From OxeyeWiki

(Difference between revisions)
Jump to: navigation, search
Jeb (Talk | contribs)
(Created page with '{{File}}The ReadFile class will open a binary file for reading. === Example === <pre> local path = daisy.getUserFolderPath("") local file = ReadFile(path .. filename) ...')
Newer edit →

Revision as of 18:22, 7 February 2010

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