Beagle Board - beagleboard.org

BoneScript

Not Connected
Did you know? This page can interact with your BeagleBone
Type in your BeagleBone's IP address here:

readTextFile(filename, [callback])

Read the contents of a text (ASCII) file.

Arguments

  • filename: complete path of the file to be read
  • callback: called upon completion

Return value

  • File contents in a single string

callback(x)

  • x.data: file contents
  • x.err: error status message

Example

X

Build and execute instructions

  • Adjust the file name to read other files and execute the example code.

See also

Related functions

Examples


Last updated by blog.hangerhead.com on Fri Jun 21 2013 14:39:12 GMT-0000 (UTC).
13146