);
}
+function checkMode(mode, access)
+{ if(access.indexOf(mode) == -1) {
+ throw new tizen.WebAPIException(tizen.WebAPIException.INVALID_ACCESS_ERR, 'Not allowed operation');
+ }
+}
+
/**
* Enumeration for the compression level.
* @enum {string}
}
}
+ checkMode(this.mode, ["w","rw", "a"]);
bridge.async({
cmd: 'ArchiveFile_add',
args: {
throw new tizen.WebAPIException(tizen.WebAPIException.TYPE_MISMATCH_ERR,
"destinationDirectory should be virtual path or file.");
+ checkMode(this.mode, ["r","rw"]);
bridge.async({
cmd: 'ArchiveFile_extractAll',
args: {
]),
opId = getNextOpId();
+ checkMode(this.mode, ["r","rw"]);
bridge.async({
cmd: 'ArchiveFile_getEntries',
args: {
]),
opId = getNextOpId();
+ checkMode(this.mode, ["r","rw"]);
bridge.async({
cmd: 'ArchiveFile_getEntryByName',
args: {