{"action":"created","comment":{"url":"https://api.github.com/repos/atom/node-pathwatcher/pulls/comments/26805695","id":26805695,"diff_hunk":"@@ -62,6 +62,22 @@ class File\n       else\n         false\n \n+  # Public: Deletes the file on disk that corresponds to `::getPath()`.\n+  #\n+  # Returns a {Promise} that resolves once the file is deleted on disk. It\n+  # resolves to a boolean value that is true if the file was deleted or false if\n+  # it never existed.\n+  delete: ->\n+    @exists().then (isExistingFile) =>\n+      return false unless isExistingFile\n+\n+      Q.Promise (resolve, reject) =>\n+        fs.unlink @getPath(), (error) ->\n+          if error && error.code != 'ENOENT'","path":"src/file.coffee","position":15,"original_position":15,"commit_id":"08aeff02c9eed42ae7e1b7e3a7d769933d4959ab","original_commit_id":"08aeff02c9eed42ae7e1b7e3a7d769933d4959ab","user":{"login":"kevinsawicki","id":671378,"avatar_url":"https://avatars.githubusercontent.com/u/671378?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinsawicki","html_url":"https://github.com/kevinsawicki","followers_url":"https://api.github.com/users/kevinsawicki/followers","following_url":"https://api.github.com/users/kevinsawicki/following{/other_user}","gists_url":"https://api.github.com/users/kevinsawicki/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinsawicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinsawicki/subscriptions","organizations_url":"https://api.github.com/users/kevinsawicki/orgs","repos_url":"https://api.github.com/users/kevinsawicki/repos","events_url":"https://api.github.com/users/kevinsawicki/events{/privacy}","received_events_url":"https://api.github.com/users/kevinsawicki/received_events","type":"User","site_admin":true},"body":"Is there a reason this check is only for files and not for directories as well?","created_at":"2015-03-19T22:48:47Z","updated_at":"2015-03-19T22:48:47Z","html_url":"https://github.com/atom/node-pathwatcher/pull/66#discussion_r26805695","pull_request_url":"https://api.github.com/repos/atom/node-pathwatcher/pulls/66","_links":{"self":{"href":"https://api.github.com/repos/atom/node-pathwatcher/pulls/comments/26805695"},"html":{"href":"https://github.com/atom/node-pathwatcher/pull/66#discussion_r26805695"},"pull_request":{"href":"https://api.github.com/repos/atom/node-pathwatcher/pulls/66"}}},"pull_request":{"url":"https://api.github.com/repos/atom/node-pathwatcher/pulls/66","id":31556591,"html_url":"https://github.com/atom/node-pathwatcher/pull/66","diff_url":"https://github.com/atom/node-pathwatcher/pull/66.diff","patch_url":"https://github.com/atom/node-pathwatcher/pull/66.patch","issue_url":"https://api.github.com/repos/atom/node-pathwatcher/issues/66","number":66,"state":"open","locked":false,"title":"Add File::delete() and Directory::delete()","user":{"login":"oclbdk","id":136982,"avatar_url":"https://avatars.githubusercontent.com/u/136982?v=3","gravatar_id":"","url":"https://api.github.com/users/oclbdk","html_url":"https://github.com/oclbdk","followers_url":"https://api.github.com/users/oclbdk/followers","following_url":"https://api.github.com/users/oclbdk/following{/other_user}","gists_url":"https://api.github.com/users/oclbdk/gists{/gist_id}","starred_url":"https://api.github.com/users/oclbdk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oclbdk/subscriptions","organizations_url":"https://api.github.com/users/oclbdk/orgs","repos_url":"https://api.github.com/users/oclbdk/repos","events_url":"https://api.github.com/users/oclbdk/events{/privacy}","received_events_url":"https://api.github.com/users/oclbdk/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-19T19:19:02Z","updated_at":"2015-03-19T22:48:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"81bce56640a4a5f5fee38880acf3585615c6c57d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/atom/node-pathwatcher/pulls/66/commits","review_comments_url":"https://api.github.com/repos/atom/node-pathwatcher/pulls/66/comments","review_comment_url":"https://api.github.com/repos/atom/node-pathwatcher/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atom/node-pathwatcher/issues/66/comments","statuses_url":"https://api.github.com/repos/atom/node-pathwatcher/statuses/08aeff02c9eed42ae7e1b7e3a7d769933d4959ab","head":{"label":"oclbdk:master","ref":"master","sha":"08aeff02c9eed42ae7e1b7e3a7d769933d4959ab","user":{"login":"oclbdk","id":136982,"avatar_url":"https://avatars.githubusercontent.com/u/136982?v=3","gravatar_id":"","url":"https://api.github.com/users/oclbdk","html_url":"https://github.com/oclbdk","followers_url":"https://api.github.com/users/oclbdk/followers","following_url":"https://api.github.com/users/oclbdk/following{/other_user}","gists_url":"https://api.github.com/users/oclbdk/gists{/gist_id}","starred_url":"https://api.github.com/users/oclbdk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oclbdk/subscriptions","organizations_url":"https://api.github.com/users/oclbdk/orgs","repos_url":"https://api.github.com/users/oclbdk/repos","events_url":"https://api.github.com/users/oclbdk/events{/privacy}","received_events_url":"https://api.github.com/users/oclbdk/received_events","type":"User","site_admin":false},"repo":{"id":32101031,"name":"node-pathwatcher","full_name":"oclbdk/node-pathwatcher","owner":{"login":"oclbdk","id":136982,"avatar_url":"https://avatars.githubusercontent.com/u/136982?v=3","gravatar_id":"","url":"https://api.github.com/users/oclbdk","html_url":"https://github.com/oclbdk","followers_url":"https://api.github.com/users/oclbdk/followers","following_url":"https://api.github.com/users/oclbdk/following{/other_user}","gists_url":"https://api.github.com/users/oclbdk/gists{/gist_id}","starred_url":"https://api.github.com/users/oclbdk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oclbdk/subscriptions","organizations_url":"https://api.github.com/users/oclbdk/orgs","repos_url":"https://api.github.com/users/oclbdk/repos","events_url":"https://api.github.com/users/oclbdk/events{/privacy}","received_events_url":"https://api.github.com/users/oclbdk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oclbdk/node-pathwatcher","description":"Path Watcher Node Module","fork":true,"url":"https://api.github.com/repos/oclbdk/node-pathwatcher","forks_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/forks","keys_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/teams","hooks_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/hooks","issue_events_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/issues/events{/number}","events_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/events","assignees_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/assignees{/user}","branches_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/branches{/branch}","tags_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/tags","blobs_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/git/refs{/sha}","trees_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/statuses/{sha}","languages_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/languages","stargazers_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/stargazers","contributors_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/contributors","subscribers_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/subscribers","subscription_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/subscription","commits_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/commits{/sha}","git_commits_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/git/commits{/sha}","comments_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/comments{/number}","issue_comment_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/issues/comments{/number}","contents_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/contents/{+path}","compare_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/merges","archive_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/downloads","issues_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/issues{/number}","pulls_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/pulls{/number}","milestones_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/milestones{/number}","notifications_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/labels{/name}","releases_url":"https://api.github.com/repos/oclbdk/node-pathwatcher/releases{/id}","created_at":"2015-03-12T20:36:18Z","updated_at":"2015-03-19T19:17:55Z","pushed_at":"2015-03-19T19:17:55Z","git_url":"git://github.com/oclbdk/node-pathwatcher.git","ssh_url":"git@github.com:oclbdk/node-pathwatcher.git","clone_url":"https://github.com/oclbdk/node-pathwatcher.git","svn_url":"https://github.com/oclbdk/node-pathwatcher","homepage":"http://atom.github.io/node-pathwatcher","size":388,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"atom:master","ref":"master","sha":"0fc9bf688ac23614d8c3f203695330fa6d6520e1","user":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"repo":{"id":9263403,"name":"node-pathwatcher","full_name":"atom/node-pathwatcher","owner":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atom/node-pathwatcher","description":"Path Watcher Node Module","fork":false,"url":"https://api.github.com/repos/atom/node-pathwatcher","forks_url":"https://api.github.com/repos/atom/node-pathwatcher/forks","keys_url":"https://api.github.com/repos/atom/node-pathwatcher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atom/node-pathwatcher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atom/node-pathwatcher/teams","hooks_url":"https://api.github.com/repos/atom/node-pathwatcher/hooks","issue_events_url":"https://api.github.com/repos/atom/node-pathwatcher/issues/events{/number}","events_url":"https://api.github.com/repos/atom/node-pathwatcher/events","assignees_url":"https://api.github.com/repos/atom/node-pathwatcher/assignees{/user}","branches_url":"https://api.github.com/repos/atom/node-pathwatcher/branches{/branch}","tags_url":"https://api.github.com/repos/atom/node-pathwatcher/tags","blobs_url":"https://api.github.com/repos/atom/node-pathwatcher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atom/node-pathwatcher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atom/node-pathwatcher/git/refs{/sha}","trees_url":"https://api.github.com/repos/atom/node-pathwatcher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atom/node-pathwatcher/statuses/{sha}","languages_url":"https://api.github.com/repos/atom/node-pathwatcher/languages","stargazers_url":"https://api.github.com/repos/atom/node-pathwatcher/stargazers","contributors_url":"https://api.github.com/repos/atom/node-pathwatcher/contributors","subscribers_url":"https://api.github.com/repos/atom/node-pathwatcher/subscribers","subscription_url":"https://api.github.com/repos/atom/node-pathwatcher/subscription","commits_url":"https://api.github.com/repos/atom/node-pathwatcher/commits{/sha}","git_commits_url":"https://api.github.com/repos/atom/node-pathwatcher/git/commits{/sha}","comments_url":"https://api.github.com/repos/atom/node-pathwatcher/comments{/number}","issue_comment_url":"https://api.github.com/repos/atom/node-pathwatcher/issues/comments{/number}","contents_url":"https://api.github.com/repos/atom/node-pathwatcher/contents/{+path}","compare_url":"https://api.github.com/repos/atom/node-pathwatcher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atom/node-pathwatcher/merges","archive_url":"https://api.github.com/repos/atom/node-pathwatcher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atom/node-pathwatcher/downloads","issues_url":"https://api.github.com/repos/atom/node-pathwatcher/issues{/number}","pulls_url":"https://api.github.com/repos/atom/node-pathwatcher/pulls{/number}","milestones_url":"https://api.github.com/repos/atom/node-pathwatcher/milestones{/number}","notifications_url":"https://api.github.com/repos/atom/node-pathwatcher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atom/node-pathwatcher/labels{/name}","releases_url":"https://api.github.com/repos/atom/node-pathwatcher/releases{/id}","created_at":"2013-04-06T17:01:46Z","updated_at":"2015-03-17T23:07:56Z","pushed_at":"2015-03-17T23:07:56Z","git_url":"git://github.com/atom/node-pathwatcher.git","ssh_url":"git@github.com:atom/node-pathwatcher.git","clone_url":"https://github.com/atom/node-pathwatcher.git","svn_url":"https://github.com/atom/node-pathwatcher","homepage":"http://atom.github.io/node-pathwatcher","size":1625,"stargazers_count":38,"watchers_count":38,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":15,"mirror_url":null,"open_issues_count":16,"forks":15,"open_issues":16,"watchers":38,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atom/node-pathwatcher/pulls/66"},"html":{"href":"https://github.com/atom/node-pathwatcher/pull/66"},"issue":{"href":"https://api.github.com/repos/atom/node-pathwatcher/issues/66"},"comments":{"href":"https://api.github.com/repos/atom/node-pathwatcher/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/atom/node-pathwatcher/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/atom/node-pathwatcher/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atom/node-pathwatcher/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/atom/node-pathwatcher/statuses/08aeff02c9eed42ae7e1b7e3a7d769933d4959ab"}}}}