{"action":"created","comment":{"url":"https://api.github.com/repos/apache/reef/pulls/comments/194554180","pull_request_review_id":127749131,"id":194554180,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDU1NDE4MA==","diff_hunk":"@@ -123,6 +123,18 @@ public void CreateDirectory(Uri directoryUri)\n         {\n         }\n \n+        /// <summary>\n+        /// Checks if uri is a directory uri.\n+        /// </summary>\n+        /// <param name=\"uri\">uri of the directory/file</param>\n+        /// <returns>true if uri is for a directory else false</returns>\n+        public bool IsDirectory(Uri uri)\n+        {\n+            var path = uri.AbsolutePath.Trim('/');\n+            var blobItems = _client.ListBlobsSegmented(path, false, BlobListingDetails.Metadata, 1, null, null, null).Results;","path":"lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureBlockBlobFileSystem.cs","position":12,"original_position":12,"commit_id":"986ef8be448cc2420d137e978b9fcc167238d944","original_commit_id":"986ef8be448cc2420d137e978b9fcc167238d944","user":{"login":"tyclintw","id":19498033,"node_id":"MDQ6VXNlcjE5NDk4MDMz","avatar_url":"https://avatars0.githubusercontent.com/u/19498033?v=4","gravatar_id":"","url":"https://api.github.com/users/tyclintw","html_url":"https://github.com/tyclintw","followers_url":"https://api.github.com/users/tyclintw/followers","following_url":"https://api.github.com/users/tyclintw/following{/other_user}","gists_url":"https://api.github.com/users/tyclintw/gists{/gist_id}","starred_url":"https://api.github.com/users/tyclintw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyclintw/subscriptions","organizations_url":"https://api.github.com/users/tyclintw/orgs","repos_url":"https://api.github.com/users/tyclintw/repos","events_url":"https://api.github.com/users/tyclintw/events{/privacy}","received_events_url":"https://api.github.com/users/tyclintw/received_events","type":"User","site_admin":false},"body":">1 [](start = 97, length = 1)\r\n\r\nsuper-nit: Make a static variable. It helps self document the code.","created_at":"2018-06-11T21:29:40Z","updated_at":"2018-06-11T21:29:40Z","html_url":"https://github.com/apache/reef/pull/1473#discussion_r194554180","pull_request_url":"https://api.github.com/repos/apache/reef/pulls/1473","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/reef/pulls/comments/194554180"},"html":{"href":"https://github.com/apache/reef/pull/1473#discussion_r194554180"},"pull_request":{"href":"https://api.github.com/repos/apache/reef/pulls/1473"}}},"pull_request":{"url":"https://api.github.com/repos/apache/reef/pulls/1473","id":193759038,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzNzU5MDM4","html_url":"https://github.com/apache/reef/pull/1473","diff_url":"https://github.com/apache/reef/pull/1473.diff","patch_url":"https://github.com/apache/reef/pull/1473.patch","issue_url":"https://api.github.com/repos/apache/reef/issues/1473","number":1473,"state":"open","locked":false,"title":"[REEF-2036] Add IFileSystem api to check if uri is a directory","user":{"login":"dwaijam","id":640582,"node_id":"MDQ6VXNlcjY0MDU4Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/640582?v=4","gravatar_id":"","url":"https://api.github.com/users/dwaijam","html_url":"https://github.com/dwaijam","followers_url":"https://api.github.com/users/dwaijam/followers","following_url":"https://api.github.com/users/dwaijam/following{/other_user}","gists_url":"https://api.github.com/users/dwaijam/gists{/gist_id}","starred_url":"https://api.github.com/users/dwaijam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwaijam/subscriptions","organizations_url":"https://api.github.com/users/dwaijam/orgs","repos_url":"https://api.github.com/users/dwaijam/repos","events_url":"https://api.github.com/users/dwaijam/events{/privacy}","received_events_url":"https://api.github.com/users/dwaijam/received_events","type":"User","site_admin":false},"body":"[REEF-2036] Add IFileSystem api to check if uri is a directory\r\n  \r\nCurrently, there is no way to check if a location specified by a uri is a directory or not. The only way to check it is by calling fs.GetChildren and checking for an exception. There should be a more graceful way of doing this check by adding an api. This change addresses this.\r\n  \r\nJIRA:\r\n  [REEF-2036](https://issues.apache.org/jira/browse/REEF-2036)\r\n \r\nPull request:\r\n  This closes [1473](https://github.com/apache/reef/pull/1473)","created_at":"2018-06-09T05:07:51Z","updated_at":"2018-06-11T21:29:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2beb2b9cc04497af6a146b40bb053a50195405a5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/reef/pulls/1473/commits","review_comments_url":"https://api.github.com/repos/apache/reef/pulls/1473/comments","review_comment_url":"https://api.github.com/repos/apache/reef/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/reef/issues/1473/comments","statuses_url":"https://api.github.com/repos/apache/reef/statuses/986ef8be448cc2420d137e978b9fcc167238d944","head":{"label":"dwaijam:dwaijam/isDir","ref":"dwaijam/isDir","sha":"986ef8be448cc2420d137e978b9fcc167238d944","user":{"login":"dwaijam","id":640582,"node_id":"MDQ6VXNlcjY0MDU4Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/640582?v=4","gravatar_id":"","url":"https://api.github.com/users/dwaijam","html_url":"https://github.com/dwaijam","followers_url":"https://api.github.com/users/dwaijam/followers","following_url":"https://api.github.com/users/dwaijam/following{/other_user}","gists_url":"https://api.github.com/users/dwaijam/gists{/gist_id}","starred_url":"https://api.github.com/users/dwaijam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwaijam/subscriptions","organizations_url":"https://api.github.com/users/dwaijam/orgs","repos_url":"https://api.github.com/users/dwaijam/repos","events_url":"https://api.github.com/users/dwaijam/events{/privacy}","received_events_url":"https://api.github.com/users/dwaijam/received_events","type":"User","site_admin":false},"repo":{"id":116431109,"node_id":"MDEwOlJlcG9zaXRvcnkxMTY0MzExMDk=","name":"reef","full_name":"dwaijam/reef","owner":{"login":"dwaijam","id":640582,"node_id":"MDQ6VXNlcjY0MDU4Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/640582?v=4","gravatar_id":"","url":"https://api.github.com/users/dwaijam","html_url":"https://github.com/dwaijam","followers_url":"https://api.github.com/users/dwaijam/followers","following_url":"https://api.github.com/users/dwaijam/following{/other_user}","gists_url":"https://api.github.com/users/dwaijam/gists{/gist_id}","starred_url":"https://api.github.com/users/dwaijam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwaijam/subscriptions","organizations_url":"https://api.github.com/users/dwaijam/orgs","repos_url":"https://api.github.com/users/dwaijam/repos","events_url":"https://api.github.com/users/dwaijam/events{/privacy}","received_events_url":"https://api.github.com/users/dwaijam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dwaijam/reef","description":"Mirror of Apache REEF","fork":true,"url":"https://api.github.com/repos/dwaijam/reef","forks_url":"https://api.github.com/repos/dwaijam/reef/forks","keys_url":"https://api.github.com/repos/dwaijam/reef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dwaijam/reef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dwaijam/reef/teams","hooks_url":"https://api.github.com/repos/dwaijam/reef/hooks","issue_events_url":"https://api.github.com/repos/dwaijam/reef/issues/events{/number}","events_url":"https://api.github.com/repos/dwaijam/reef/events","assignees_url":"https://api.github.com/repos/dwaijam/reef/assignees{/user}","branches_url":"https://api.github.com/repos/dwaijam/reef/branches{/branch}","tags_url":"https://api.github.com/repos/dwaijam/reef/tags","blobs_url":"https://api.github.com/repos/dwaijam/reef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dwaijam/reef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dwaijam/reef/git/refs{/sha}","trees_url":"https://api.github.com/repos/dwaijam/reef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dwaijam/reef/statuses/{sha}","languages_url":"https://api.github.com/repos/dwaijam/reef/languages","stargazers_url":"https://api.github.com/repos/dwaijam/reef/stargazers","contributors_url":"https://api.github.com/repos/dwaijam/reef/contributors","subscribers_url":"https://api.github.com/repos/dwaijam/reef/subscribers","subscription_url":"https://api.github.com/repos/dwaijam/reef/subscription","commits_url":"https://api.github.com/repos/dwaijam/reef/commits{/sha}","git_commits_url":"https://api.github.com/repos/dwaijam/reef/git/commits{/sha}","comments_url":"https://api.github.com/repos/dwaijam/reef/comments{/number}","issue_comment_url":"https://api.github.com/repos/dwaijam/reef/issues/comments{/number}","contents_url":"https://api.github.com/repos/dwaijam/reef/contents/{+path}","compare_url":"https://api.github.com/repos/dwaijam/reef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dwaijam/reef/merges","archive_url":"https://api.github.com/repos/dwaijam/reef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dwaijam/reef/downloads","issues_url":"https://api.github.com/repos/dwaijam/reef/issues{/number}","pulls_url":"https://api.github.com/repos/dwaijam/reef/pulls{/number}","milestones_url":"https://api.github.com/repos/dwaijam/reef/milestones{/number}","notifications_url":"https://api.github.com/repos/dwaijam/reef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dwaijam/reef/labels{/name}","releases_url":"https://api.github.com/repos/dwaijam/reef/releases{/id}","deployments_url":"https://api.github.com/repos/dwaijam/reef/deployments","created_at":"2018-01-05T22:02:52Z","updated_at":"2018-03-27T00:30:04Z","pushed_at":"2018-06-11T21:23:11Z","git_url":"git://github.com/dwaijam/reef.git","ssh_url":"git@github.com:dwaijam/reef.git","clone_url":"https://github.com/dwaijam/reef.git","svn_url":"https://github.com/dwaijam/reef","homepage":"","size":39590,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"7e1ec477a04fb52d6c59bc94af69b507a155876f","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":25623941,"node_id":"MDEwOlJlcG9zaXRvcnkyNTYyMzk0MQ==","name":"reef","full_name":"apache/reef","owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/reef","description":"Mirror of Apache REEF","fork":false,"url":"https://api.github.com/repos/apache/reef","forks_url":"https://api.github.com/repos/apache/reef/forks","keys_url":"https://api.github.com/repos/apache/reef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/reef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/reef/teams","hooks_url":"https://api.github.com/repos/apache/reef/hooks","issue_events_url":"https://api.github.com/repos/apache/reef/issues/events{/number}","events_url":"https://api.github.com/repos/apache/reef/events","assignees_url":"https://api.github.com/repos/apache/reef/assignees{/user}","branches_url":"https://api.github.com/repos/apache/reef/branches{/branch}","tags_url":"https://api.github.com/repos/apache/reef/tags","blobs_url":"https://api.github.com/repos/apache/reef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/reef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/reef/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/reef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/reef/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/reef/languages","stargazers_url":"https://api.github.com/repos/apache/reef/stargazers","contributors_url":"https://api.github.com/repos/apache/reef/contributors","subscribers_url":"https://api.github.com/repos/apache/reef/subscribers","subscription_url":"https://api.github.com/repos/apache/reef/subscription","commits_url":"https://api.github.com/repos/apache/reef/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/reef/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/reef/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/reef/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/reef/contents/{+path}","compare_url":"https://api.github.com/repos/apache/reef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/reef/merges","archive_url":"https://api.github.com/repos/apache/reef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/reef/downloads","issues_url":"https://api.github.com/repos/apache/reef/issues{/number}","pulls_url":"https://api.github.com/repos/apache/reef/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/reef/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/reef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/reef/labels{/name}","releases_url":"https://api.github.com/repos/apache/reef/releases{/id}","deployments_url":"https://api.github.com/repos/apache/reef/deployments","created_at":"2014-10-23T07:00:10Z","updated_at":"2018-06-09T00:16:20Z","pushed_at":"2018-06-11T21:23:13Z","git_url":"git://github.com/apache/reef.git","ssh_url":"git@github.com:apache/reef.git","clone_url":"https://github.com/apache/reef.git","svn_url":"https://github.com/apache/reef","homepage":"","size":39672,"stargazers_count":79,"watchers_count":79,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":99,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":99,"open_issues":13,"watchers":79,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/reef/pulls/1473"},"html":{"href":"https://github.com/apache/reef/pull/1473"},"issue":{"href":"https://api.github.com/repos/apache/reef/issues/1473"},"comments":{"href":"https://api.github.com/repos/apache/reef/issues/1473/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/reef/pulls/1473/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/reef/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/reef/pulls/1473/commits"},"statuses":{"href":"https://api.github.com/repos/apache/reef/statuses/986ef8be448cc2420d137e978b9fcc167238d944"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tyclintw"}}