Banana.IO.LocalFile

文件资料 •
在此文中

The LocalFile class represents a file on the local file system. See Banana.IO for an example.

Properties

codecName

The name of the codec to be used for reading or writing the file. Default is 'UTF-8'.

errorString

Read only. The string of the last occured error. If no error occured it is empty.

Methods

read()

Returns the content of the file. This function has no way of reporting errors. Returning an empty string can mean either that the file is empty, or that an error occurred. Check the content of the property errorString to see if an error occured.

write(text [, append])

Write text to the file. If append is set to true, text is appended to the file. Returns true if the operation was succesfully, false otherwise.

 

Tell us how we can help you better
If the information on this page is not what you're looking for, is not clear enough, or is not up-to-date, let us know.

分享这篇文章: Twitter | Facebook | LinkedIn | Email