Global.helma.File.open ()
Sourcecode in /home/hannes/helma/modules/helma/File.js:
72:   this.open = function() {
73:         if (self.isOpened()) {
74:            setError(new IllegalStateException("File already open"));
75:            return false;
76:         }
77:         // We assume that the BufferedReader and PrintWriter creation
78:         // cannot fail except if the FileReader/FileWriter fails.
79:         // Otherwise we have an open file until the reader/writer
80:         // get garbage collected.
81:        try{
82:           if (file.exists()) {
83:              readerWriter = new BufferedReader(new FileReader(file));
84:           } else {
85:              readerWriter = new PrintWriter(new FileWriter(file));
86:           }
87:           return true;
88:        } catch (e) {
89:           setError(e);
90:           return false;
91:        }
92:        return;
93:     }