toString()

语法

IniFile.toString()

类别

IniFile

描述

转换成文本。

参数

返回值

执行成功,返回对象.

执行失败,抛异常。

错误

如果出错则抛异常,并输出错误信息,可以通过getLastErrMsg()获取错误信息或通过getLastError()获取错误码。 关于错误处理可以参考常见错误处理指南

常见错误可参考错误码

示例

  • 打开一个 INI 文件。

    1. > var ini = new IniFile( "/opt/sequoiadb/file.ini", SDB_INIFILE_FLAGS_DEFAULT )
  • 转换成对象。

    1. > ini.toString()
    2. ; personal information
    3. [info]
    4. ; what's your name
    5. name=Alan
    6. age=23
    7. ; End of INI file