{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/jaggery/pulls/comments/68110773","id":68110773,"diff_hunk":"@@ -369,4 +369,178 @@ public static Object jsFunction_listFiles(Context cx, Scriptable thisObj, Object\n         return cx.newArray(thisObj, fhol.toArray());\n     }\n \n+    /**\n+     * To unzip a zip file\n+     *\n+     * @param cx      Context\n+     * @param thisObj FileHostObject to be unzipped\n+     * @param args    Path to unzip the zip file\n+     * @param funObj  Function Object\n+     * @throws ScriptException\n+     */\n+    public static boolean jsFunction_unZip(Context cx, Scriptable thisObj, Object[] args, Function funObj)\n+            throws ScriptException, IOException {\n+        String functionName = \"unZip\";\n+        int argsCount = args.length;","path":"components/hostobjects/org.jaggeryjs.hostobjects.file/src/main/java/org/jaggeryjs/hostobjects/file/FileHostObject.java","position":34,"original_position":34,"commit_id":"c63939275e6fbb15903ad395e99cabe60d33bd22","original_commit_id":"52fc5da993d6e7806a8b3e4b5bbedf7ec60634ff","user":{"login":"Megala21","id":4003116,"avatar_url":"https://avatars.githubusercontent.com/u/4003116?v=3","gravatar_id":"","url":"https://api.github.com/users/Megala21","html_url":"https://github.com/Megala21","followers_url":"https://api.github.com/users/Megala21/followers","following_url":"https://api.github.com/users/Megala21/following{/other_user}","gists_url":"https://api.github.com/users/Megala21/gists{/gist_id}","starred_url":"https://api.github.com/users/Megala21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Megala21/subscriptions","organizations_url":"https://api.github.com/users/Megala21/orgs","repos_url":"https://api.github.com/users/Megala21/repos","events_url":"https://api.github.com/users/Megala21/events{/privacy}","received_events_url":"https://api.github.com/users/Megala21/received_events","type":"User","site_admin":false},"body":"I think when there are no arguments, it will come as empty array. So we do not need to check null. Similar way is followed in other methods in this class as well. ","created_at":"2016-06-22T18:40:41Z","updated_at":"2016-06-22T18:40:41Z","html_url":"https://github.com/wso2/jaggery/pull/157#discussion_r68110773","pull_request_url":"https://api.github.com/repos/wso2/jaggery/pulls/157","_links":{"self":{"href":"https://api.github.com/repos/wso2/jaggery/pulls/comments/68110773"},"html":{"href":"https://github.com/wso2/jaggery/pull/157#discussion_r68110773"},"pull_request":{"href":"https://api.github.com/repos/wso2/jaggery/pulls/157"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/jaggery/pulls/157","id":74647828,"html_url":"https://github.com/wso2/jaggery/pull/157","diff_url":"https://github.com/wso2/jaggery/pull/157.diff","patch_url":"https://github.com/wso2/jaggery/pull/157.patch","issue_url":"https://api.github.com/repos/wso2/jaggery/issues/157","number":157,"state":"open","locked":false,"title":"Adding zipping and unzipping functionality to FileHostObject","user":{"login":"Megala21","id":4003116,"avatar_url":"https://avatars.githubusercontent.com/u/4003116?v=3","gravatar_id":"","url":"https://api.github.com/users/Megala21","html_url":"https://github.com/Megala21","followers_url":"https://api.github.com/users/Megala21/followers","following_url":"https://api.github.com/users/Megala21/following{/other_user}","gists_url":"https://api.github.com/users/Megala21/gists{/gist_id}","starred_url":"https://api.github.com/users/Megala21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Megala21/subscriptions","organizations_url":"https://api.github.com/users/Megala21/orgs","repos_url":"https://api.github.com/users/Megala21/repos","events_url":"https://api.github.com/users/Megala21/events{/privacy}","received_events_url":"https://api.github.com/users/Megala21/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-21T16:54:55Z","updated_at":"2016-06-22T18:40:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b98667d6f1593348b3ccd34c6d23c09c658592c7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wso2/jaggery/pulls/157/commits","review_comments_url":"https://api.github.com/repos/wso2/jaggery/pulls/157/comments","review_comment_url":"https://api.github.com/repos/wso2/jaggery/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/jaggery/issues/157/comments","statuses_url":"https://api.github.com/repos/wso2/jaggery/statuses/c63939275e6fbb15903ad395e99cabe60d33bd22","head":{"label":"Megala21:master","ref":"master","sha":"c63939275e6fbb15903ad395e99cabe60d33bd22","user":{"login":"Megala21","id":4003116,"avatar_url":"https://avatars.githubusercontent.com/u/4003116?v=3","gravatar_id":"","url":"https://api.github.com/users/Megala21","html_url":"https://github.com/Megala21","followers_url":"https://api.github.com/users/Megala21/followers","following_url":"https://api.github.com/users/Megala21/following{/other_user}","gists_url":"https://api.github.com/users/Megala21/gists{/gist_id}","starred_url":"https://api.github.com/users/Megala21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Megala21/subscriptions","organizations_url":"https://api.github.com/users/Megala21/orgs","repos_url":"https://api.github.com/users/Megala21/repos","events_url":"https://api.github.com/users/Megala21/events{/privacy}","received_events_url":"https://api.github.com/users/Megala21/received_events","type":"User","site_admin":false},"repo":{"id":55750638,"name":"jaggery","full_name":"Megala21/jaggery","owner":{"login":"Megala21","id":4003116,"avatar_url":"https://avatars.githubusercontent.com/u/4003116?v=3","gravatar_id":"","url":"https://api.github.com/users/Megala21","html_url":"https://github.com/Megala21","followers_url":"https://api.github.com/users/Megala21/followers","following_url":"https://api.github.com/users/Megala21/following{/other_user}","gists_url":"https://api.github.com/users/Megala21/gists{/gist_id}","starred_url":"https://api.github.com/users/Megala21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Megala21/subscriptions","organizations_url":"https://api.github.com/users/Megala21/orgs","repos_url":"https://api.github.com/users/Megala21/repos","events_url":"https://api.github.com/users/Megala21/events{/privacy}","received_events_url":"https://api.github.com/users/Megala21/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Megala21/jaggery","description":"The delicious Javascript framework","fork":true,"url":"https://api.github.com/repos/Megala21/jaggery","forks_url":"https://api.github.com/repos/Megala21/jaggery/forks","keys_url":"https://api.github.com/repos/Megala21/jaggery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Megala21/jaggery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Megala21/jaggery/teams","hooks_url":"https://api.github.com/repos/Megala21/jaggery/hooks","issue_events_url":"https://api.github.com/repos/Megala21/jaggery/issues/events{/number}","events_url":"https://api.github.com/repos/Megala21/jaggery/events","assignees_url":"https://api.github.com/repos/Megala21/jaggery/assignees{/user}","branches_url":"https://api.github.com/repos/Megala21/jaggery/branches{/branch}","tags_url":"https://api.github.com/repos/Megala21/jaggery/tags","blobs_url":"https://api.github.com/repos/Megala21/jaggery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Megala21/jaggery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Megala21/jaggery/git/refs{/sha}","trees_url":"https://api.github.com/repos/Megala21/jaggery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Megala21/jaggery/statuses/{sha}","languages_url":"https://api.github.com/repos/Megala21/jaggery/languages","stargazers_url":"https://api.github.com/repos/Megala21/jaggery/stargazers","contributors_url":"https://api.github.com/repos/Megala21/jaggery/contributors","subscribers_url":"https://api.github.com/repos/Megala21/jaggery/subscribers","subscription_url":"https://api.github.com/repos/Megala21/jaggery/subscription","commits_url":"https://api.github.com/repos/Megala21/jaggery/commits{/sha}","git_commits_url":"https://api.github.com/repos/Megala21/jaggery/git/commits{/sha}","comments_url":"https://api.github.com/repos/Megala21/jaggery/comments{/number}","issue_comment_url":"https://api.github.com/repos/Megala21/jaggery/issues/comments{/number}","contents_url":"https://api.github.com/repos/Megala21/jaggery/contents/{+path}","compare_url":"https://api.github.com/repos/Megala21/jaggery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Megala21/jaggery/merges","archive_url":"https://api.github.com/repos/Megala21/jaggery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Megala21/jaggery/downloads","issues_url":"https://api.github.com/repos/Megala21/jaggery/issues{/number}","pulls_url":"https://api.github.com/repos/Megala21/jaggery/pulls{/number}","milestones_url":"https://api.github.com/repos/Megala21/jaggery/milestones{/number}","notifications_url":"https://api.github.com/repos/Megala21/jaggery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Megala21/jaggery/labels{/name}","releases_url":"https://api.github.com/repos/Megala21/jaggery/releases{/id}","deployments_url":"https://api.github.com/repos/Megala21/jaggery/deployments","created_at":"2016-04-08T04:39:20Z","updated_at":"2016-04-08T04:39:22Z","pushed_at":"2016-06-22T18:39:16Z","git_url":"git://github.com/Megala21/jaggery.git","ssh_url":"git@github.com:Megala21/jaggery.git","clone_url":"https://github.com/Megala21/jaggery.git","svn_url":"https://github.com/Megala21/jaggery","homepage":null,"size":8873,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wso2:master","ref":"master","sha":"09059ac8606c162d8df02a0df9c4a42e69ade8e3","user":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":5303159,"name":"jaggery","full_name":"wso2/jaggery","owner":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2/jaggery","description":"The delicious Javascript framework","fork":false,"url":"https://api.github.com/repos/wso2/jaggery","forks_url":"https://api.github.com/repos/wso2/jaggery/forks","keys_url":"https://api.github.com/repos/wso2/jaggery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/jaggery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/jaggery/teams","hooks_url":"https://api.github.com/repos/wso2/jaggery/hooks","issue_events_url":"https://api.github.com/repos/wso2/jaggery/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/jaggery/events","assignees_url":"https://api.github.com/repos/wso2/jaggery/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/jaggery/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/jaggery/tags","blobs_url":"https://api.github.com/repos/wso2/jaggery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/jaggery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/jaggery/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/jaggery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/jaggery/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/jaggery/languages","stargazers_url":"https://api.github.com/repos/wso2/jaggery/stargazers","contributors_url":"https://api.github.com/repos/wso2/jaggery/contributors","subscribers_url":"https://api.github.com/repos/wso2/jaggery/subscribers","subscription_url":"https://api.github.com/repos/wso2/jaggery/subscription","commits_url":"https://api.github.com/repos/wso2/jaggery/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/jaggery/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/jaggery/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/jaggery/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/jaggery/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/jaggery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/jaggery/merges","archive_url":"https://api.github.com/repos/wso2/jaggery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/jaggery/downloads","issues_url":"https://api.github.com/repos/wso2/jaggery/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/jaggery/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/jaggery/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/jaggery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/jaggery/labels{/name}","releases_url":"https://api.github.com/repos/wso2/jaggery/releases{/id}","deployments_url":"https://api.github.com/repos/wso2/jaggery/deployments","created_at":"2012-08-05T11:49:00Z","updated_at":"2016-06-20T03:23:16Z","pushed_at":"2016-06-22T18:39:17Z","git_url":"git://github.com/wso2/jaggery.git","ssh_url":"git@github.com:wso2/jaggery.git","clone_url":"https://github.com/wso2/jaggery.git","svn_url":"https://github.com/wso2/jaggery","homepage":null,"size":183062,"stargazers_count":62,"watchers_count":62,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":134,"mirror_url":null,"open_issues_count":52,"forks":134,"open_issues":52,"watchers":62,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/jaggery/pulls/157"},"html":{"href":"https://github.com/wso2/jaggery/pull/157"},"issue":{"href":"https://api.github.com/repos/wso2/jaggery/issues/157"},"comments":{"href":"https://api.github.com/repos/wso2/jaggery/issues/157/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/jaggery/pulls/157/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/jaggery/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/jaggery/pulls/157/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/jaggery/statuses/c63939275e6fbb15903ad395e99cabe60d33bd22"}}}}
{"actor":{"display_login":"Megala21"}}