{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/corefxlab/pulls/comments/184762470","pull_request_review_id":116028931,"id":184762470,"diff_hunk":"@@ -33,43 +35,47 @@ public class PollingWatcher : IDisposable\n         bool _includeSubdirectories;\n \n         List<string> _extensionsToWatch;\n-        List<string> _directories = new List<string>();\n+        string _directory;\n         PathToFileStateHashtable _state; // stores state of the directory\n         byte _version; // this is used to keep track of removals. // TODO: describe the algorithm\n+        static string[] SpecialFiles = new[] { \"\", \".\", \"..\" };\n \n         /// <summary>\n         /// Creates an instance of a watcher\n         /// </summary>\n-        /// <param name=\"rootDirectory\">The directory to watch. It does not support UNC paths (yet).</param>\n+        /// <param name=\"directory\">The directory to watch. It does not support UNC paths (yet).</param>\n         /// <param name=\"includeSubdirectories\">A bool controlling whether or not subdirectories will be watched too</param>\n         /// <param name=\"pollingIntervalInMilliseconds\">Polling interval</param>\n-        public PollingWatcher(string rootDirectory, bool includeSubdirectories = false, int pollingIntervalInMilliseconds = 1000)\n+        public PollingWatcher(string directory, bool includeSubdirectories = false, int pollingIntervalInMilliseconds = 1000)\n         {\n+            if (!Directory.Exists(directory))\n+                throw new ArgumentException(\"Directory not found.\", nameof(directory));\n+\n             Tracing = new TraceSource(\"PollingWatcher\");\n-            _state = new PathToFileStateHashtable(Tracing); \n+            _state = new PathToFileStateHashtable(Tracing);\n             _pollingIntervalInMilliseconds = pollingIntervalInMilliseconds;\n             _includeSubdirectories = includeSubdirectories;\n-            _directories.Add(ToDirectoryFormat(rootDirectory));\n+            _directory = directory;\n         }\n \n         /// <summary>\n         /// Extensions to watch\n         /// </summary>\n-        /// <param name=\"extension\">for examople \"txt\", \"doc\", etc., i.e don't use wildcards</param>\n+        /// <param name=\"extension\">for example \"txt\", \"doc\", etc., i.e don't use wildcards</param>\n         /// <remarks>\n         /// By default all extensions are watched. Once this method is called, only extensions in added are watched.\n         /// </remarks>\n         public void AddExtension(string extension)","path":"src/System.IO.FileSystem.Watcher.Polling/System/IO/PollingWatcher.cs","position":50,"original_position":50,"commit_id":"6c4a7bbc322119a97b32f7d06cf17df2d15be73f","original_commit_id":"6c4a7bbc322119a97b32f7d06cf17df2d15be73f","user":{"login":"JeremyKuhne","id":8184940,"avatar_url":"https://avatars3.githubusercontent.com/u/8184940?v=4","gravatar_id":"","url":"https://api.github.com/users/JeremyKuhne","html_url":"https://github.com/JeremyKuhne","followers_url":"https://api.github.com/users/JeremyKuhne/followers","following_url":"https://api.github.com/users/JeremyKuhne/following{/other_user}","gists_url":"https://api.github.com/users/JeremyKuhne/gists{/gist_id}","starred_url":"https://api.github.com/users/JeremyKuhne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeremyKuhne/subscriptions","organizations_url":"https://api.github.com/users/JeremyKuhne/orgs","repos_url":"https://api.github.com/users/JeremyKuhne/repos","events_url":"https://api.github.com/users/JeremyKuhne/events{/privacy}","received_events_url":"https://api.github.com/users/JeremyKuhne/received_events","type":"User","site_admin":false},"body":"We should eventually remove this and make it `Filters`. We didn't have a non-allocating matcher when this was first written. ","created_at":"2018-04-27T17:57:49Z","updated_at":"2018-04-27T17:57:49Z","html_url":"https://github.com/dotnet/corefxlab/pull/2208#discussion_r184762470","pull_request_url":"https://api.github.com/repos/dotnet/corefxlab/pulls/2208","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/comments/184762470"},"html":{"href":"https://github.com/dotnet/corefxlab/pull/2208#discussion_r184762470"},"pull_request":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/2208"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/corefxlab/pulls/2208","id":181516622,"html_url":"https://github.com/dotnet/corefxlab/pull/2208","diff_url":"https://github.com/dotnet/corefxlab/pull/2208.diff","patch_url":"https://github.com/dotnet/corefxlab/pull/2208.patch","issue_url":"https://api.github.com/repos/dotnet/corefxlab/issues/2208","number":2208,"state":"open","locked":false,"title":"Remove Windows specific code","user":{"login":"MisinformedDNA","id":1784452,"avatar_url":"https://avatars0.githubusercontent.com/u/1784452?v=4","gravatar_id":"","url":"https://api.github.com/users/MisinformedDNA","html_url":"https://github.com/MisinformedDNA","followers_url":"https://api.github.com/users/MisinformedDNA/followers","following_url":"https://api.github.com/users/MisinformedDNA/following{/other_user}","gists_url":"https://api.github.com/users/MisinformedDNA/gists{/gist_id}","starred_url":"https://api.github.com/users/MisinformedDNA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MisinformedDNA/subscriptions","organizations_url":"https://api.github.com/users/MisinformedDNA/orgs","repos_url":"https://api.github.com/users/MisinformedDNA/repos","events_url":"https://api.github.com/users/MisinformedDNA/events{/privacy}","received_events_url":"https://api.github.com/users/MisinformedDNA/received_events","type":"User","site_admin":false},"body":"#1534 ","created_at":"2018-04-13T15:09:36Z","updated_at":"2018-04-27T17:57:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"93b22d20e5a40e4070fe0a9a5b30c2fc689ba7b6","assignee":{"login":"JeremyKuhne","id":8184940,"avatar_url":"https://avatars3.githubusercontent.com/u/8184940?v=4","gravatar_id":"","url":"https://api.github.com/users/JeremyKuhne","html_url":"https://github.com/JeremyKuhne","followers_url":"https://api.github.com/users/JeremyKuhne/followers","following_url":"https://api.github.com/users/JeremyKuhne/following{/other_user}","gists_url":"https://api.github.com/users/JeremyKuhne/gists{/gist_id}","starred_url":"https://api.github.com/users/JeremyKuhne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeremyKuhne/subscriptions","organizations_url":"https://api.github.com/users/JeremyKuhne/orgs","repos_url":"https://api.github.com/users/JeremyKuhne/repos","events_url":"https://api.github.com/users/JeremyKuhne/events{/privacy}","received_events_url":"https://api.github.com/users/JeremyKuhne/received_events","type":"User","site_admin":false},"assignees":[{"login":"JeremyKuhne","id":8184940,"avatar_url":"https://avatars3.githubusercontent.com/u/8184940?v=4","gravatar_id":"","url":"https://api.github.com/users/JeremyKuhne","html_url":"https://github.com/JeremyKuhne","followers_url":"https://api.github.com/users/JeremyKuhne/followers","following_url":"https://api.github.com/users/JeremyKuhne/following{/other_user}","gists_url":"https://api.github.com/users/JeremyKuhne/gists{/gist_id}","starred_url":"https://api.github.com/users/JeremyKuhne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeremyKuhne/subscriptions","organizations_url":"https://api.github.com/users/JeremyKuhne/orgs","repos_url":"https://api.github.com/users/JeremyKuhne/repos","events_url":"https://api.github.com/users/JeremyKuhne/events{/privacy}","received_events_url":"https://api.github.com/users/JeremyKuhne/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":448427834,"url":"https://api.github.com/repos/dotnet/corefxlab/labels/area-System.IO.FileSystem.Watcher","name":"area-System.IO.FileSystem.Watcher","color":"d4c5f9","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/corefxlab/pulls/2208/commits","review_comments_url":"https://api.github.com/repos/dotnet/corefxlab/pulls/2208/comments","review_comment_url":"https://api.github.com/repos/dotnet/corefxlab/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/corefxlab/issues/2208/comments","statuses_url":"https://api.github.com/repos/dotnet/corefxlab/statuses/6c4a7bbc322119a97b32f7d06cf17df2d15be73f","head":{"label":"MisinformedDNA:remove-windows-code","ref":"remove-windows-code","sha":"6c4a7bbc322119a97b32f7d06cf17df2d15be73f","user":{"login":"MisinformedDNA","id":1784452,"avatar_url":"https://avatars0.githubusercontent.com/u/1784452?v=4","gravatar_id":"","url":"https://api.github.com/users/MisinformedDNA","html_url":"https://github.com/MisinformedDNA","followers_url":"https://api.github.com/users/MisinformedDNA/followers","following_url":"https://api.github.com/users/MisinformedDNA/following{/other_user}","gists_url":"https://api.github.com/users/MisinformedDNA/gists{/gist_id}","starred_url":"https://api.github.com/users/MisinformedDNA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MisinformedDNA/subscriptions","organizations_url":"https://api.github.com/users/MisinformedDNA/orgs","repos_url":"https://api.github.com/users/MisinformedDNA/repos","events_url":"https://api.github.com/users/MisinformedDNA/events{/privacy}","received_events_url":"https://api.github.com/users/MisinformedDNA/received_events","type":"User","site_admin":false},"repo":{"id":129324865,"name":"corefxlab","full_name":"MisinformedDNA/corefxlab","owner":{"login":"MisinformedDNA","id":1784452,"avatar_url":"https://avatars0.githubusercontent.com/u/1784452?v=4","gravatar_id":"","url":"https://api.github.com/users/MisinformedDNA","html_url":"https://github.com/MisinformedDNA","followers_url":"https://api.github.com/users/MisinformedDNA/followers","following_url":"https://api.github.com/users/MisinformedDNA/following{/other_user}","gists_url":"https://api.github.com/users/MisinformedDNA/gists{/gist_id}","starred_url":"https://api.github.com/users/MisinformedDNA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MisinformedDNA/subscriptions","organizations_url":"https://api.github.com/users/MisinformedDNA/orgs","repos_url":"https://api.github.com/users/MisinformedDNA/repos","events_url":"https://api.github.com/users/MisinformedDNA/events{/privacy}","received_events_url":"https://api.github.com/users/MisinformedDNA/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MisinformedDNA/corefxlab","description":"This repo is for experimentation and exploring new ideas that may or may not make it into the main corefx repo.","fork":true,"url":"https://api.github.com/repos/MisinformedDNA/corefxlab","forks_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/forks","keys_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/teams","hooks_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/hooks","issue_events_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/issues/events{/number}","events_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/events","assignees_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/assignees{/user}","branches_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/branches{/branch}","tags_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/tags","blobs_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/git/refs{/sha}","trees_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/statuses/{sha}","languages_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/languages","stargazers_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/stargazers","contributors_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/contributors","subscribers_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/subscribers","subscription_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/subscription","commits_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/commits{/sha}","git_commits_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/git/commits{/sha}","comments_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/comments{/number}","issue_comment_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/issues/comments{/number}","contents_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/contents/{+path}","compare_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/merges","archive_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/downloads","issues_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/issues{/number}","pulls_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/pulls{/number}","milestones_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/milestones{/number}","notifications_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/labels{/name}","releases_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/releases{/id}","deployments_url":"https://api.github.com/repos/MisinformedDNA/corefxlab/deployments","created_at":"2018-04-13T00:10:37Z","updated_at":"2018-04-13T00:10:41Z","pushed_at":"2018-04-21T01:10:34Z","git_url":"git://github.com/MisinformedDNA/corefxlab.git","ssh_url":"git@github.com:MisinformedDNA/corefxlab.git","clone_url":"https://github.com/MisinformedDNA/corefxlab.git","svn_url":"https://github.com/MisinformedDNA/corefxlab","homepage":"","size":54940,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"b8e0ab345bca5c41f3640d88dd43562e0149b042","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":29504192,"name":"corefxlab","full_name":"dotnet/corefxlab","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/corefxlab","description":"This repo is for experimentation and exploring new ideas that may or may not make it into the main corefx repo.","fork":false,"url":"https://api.github.com/repos/dotnet/corefxlab","forks_url":"https://api.github.com/repos/dotnet/corefxlab/forks","keys_url":"https://api.github.com/repos/dotnet/corefxlab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/corefxlab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/corefxlab/teams","hooks_url":"https://api.github.com/repos/dotnet/corefxlab/hooks","issue_events_url":"https://api.github.com/repos/dotnet/corefxlab/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/corefxlab/events","assignees_url":"https://api.github.com/repos/dotnet/corefxlab/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/corefxlab/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/corefxlab/tags","blobs_url":"https://api.github.com/repos/dotnet/corefxlab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/corefxlab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/corefxlab/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/corefxlab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/corefxlab/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/corefxlab/languages","stargazers_url":"https://api.github.com/repos/dotnet/corefxlab/stargazers","contributors_url":"https://api.github.com/repos/dotnet/corefxlab/contributors","subscribers_url":"https://api.github.com/repos/dotnet/corefxlab/subscribers","subscription_url":"https://api.github.com/repos/dotnet/corefxlab/subscription","commits_url":"https://api.github.com/repos/dotnet/corefxlab/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/corefxlab/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/corefxlab/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/corefxlab/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/corefxlab/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/corefxlab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/corefxlab/merges","archive_url":"https://api.github.com/repos/dotnet/corefxlab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/corefxlab/downloads","issues_url":"https://api.github.com/repos/dotnet/corefxlab/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/corefxlab/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/corefxlab/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/corefxlab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/corefxlab/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/corefxlab/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/corefxlab/deployments","created_at":"2015-01-20T00:44:35Z","updated_at":"2018-04-27T09:50:09Z","pushed_at":"2018-04-27T15:14:04Z","git_url":"git://github.com/dotnet/corefxlab.git","ssh_url":"git@github.com:dotnet/corefxlab.git","clone_url":"https://github.com/dotnet/corefxlab.git","svn_url":"https://github.com/dotnet/corefxlab","homepage":"","size":54947,"stargazers_count":1089,"watchers_count":1089,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":275,"mirror_url":null,"archived":false,"open_issues_count":195,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":275,"open_issues":195,"watchers":1089,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/2208"},"html":{"href":"https://github.com/dotnet/corefxlab/pull/2208"},"issue":{"href":"https://api.github.com/repos/dotnet/corefxlab/issues/2208"},"comments":{"href":"https://api.github.com/repos/dotnet/corefxlab/issues/2208/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/2208/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/2208/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/corefxlab/statuses/6c4a7bbc322119a97b32f7d06cf17df2d15be73f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"JeremyKuhne"}}