value: data,
writable: false,
enumerable: false
+ },
+ _closed: {
+ value: false,
+ writable: true,
+ enumerable: false
}
});
}
+function _checkClosed(stream) {
+ if (stream._closed) {
+ throw new tizen.WebAPIException(tizen.WebAPIException.IO_ERR, 'Stream is closed.');
+ }
+}
+
FileStream.prototype.close = function() {
-// TODO: close
+ this._closed = true;
};
function _checkReadAccess(mode) {
}
]);
+ _checkClosed(this);
+
if (args.charCount <= 0) {
throw new tizen.WebAPIException(tizen.WebAPIException.INVALID_VALUES_ERR,
'Argument "charCount" must be greater than 0');
}
]);
+ _checkClosed(this);
+
if (args.byteCount <= 0) {
throw new tizen.WebAPIException(tizen.WebAPIException.INVALID_VALUES_ERR,
'Argument "byteCount" must be greater than 0');
}
]);
+ _checkClosed(this);
+
if (args.byteCount <= 0) {
throw new tizen.WebAPIException(tizen.WebAPIException.INVALID_VALUES_ERR,
'Argument "byteCount" must be greater than 0');
}
]);
+ _checkClosed(this);
_checkWriteAccess(this._mode);
var data = {
}
]);
+ _checkClosed(this);
_checkWriteAccess(this._mode);
var data = {
}
]);
+ _checkClosed(this);
_checkWriteAccess(this._mode);
var data = {