top

closeCommonFile

Published 2014-10-28 | (Compatible with SDK 2.5,3.5,4.5,5.0,5.1 and 2010,2011,2012,2013,2014 models)

Closes files opened by openCommonFile

The closeCommonFile class closes files opened by openCommonFile().

closeCommonFile
Syntax fileSystemObj.closeCommonFile(fileObj);
Parameter
fileObj (browser file object)
The file instance returned by openCommonFile()
Return Value Boolean
Remarks Opened files should be closed. Especially, if a file is outputted by methods such as writeAll(), the output is not saved without closing the file object.
Example
var fileSystemObj = new FileSystem();
var fileObj = fileSystemObj.openCommonFile(curWidget.id + '/testFile.data', 'w');
    fileObj.writeAll('something to write.');
    fileSystemObj.closeCommonFile(fileObj);
Enumeration None