{"action":"created","comment":{"url":"https://api.github.com/repos/joel-costigliola/assertj-core/pulls/comments/22398441","id":22398441,"diff_hunk":"@@ -0,0 +1,107 @@\n+package org.assertj.core.api;\n+\n+import org.assertj.core.internal.Paths;\n+import org.assertj.core.util.VisibleForTesting;\n+\n+import java.nio.file.FileSystem;\n+import java.nio.file.FileSystems;\n+import java.nio.file.Files;\n+import java.nio.file.LinkOption;\n+import java.nio.file.Path;\n+\n+/**\n+ * Assertions for {@link Path} objects\n+ *\n+ * <p>Please note that a {@code Path} object may, or may not, be issued from the\n+ * {@link FileSystems#getDefault() default filesystem} (that is, the filesystem\n+ * which the JVM is running on). These assertions are \"filesystem independent\".\n+ * </p>\n+ *\n+ * @param <S> self type\n+ *\n+ * @see Path\n+ * @see FileSystem\n+ * @see FileSystem#getPath(String, String...)\n+ * @see Files\n+ */\n+public abstract class AbstractPathAssert<S extends AbstractPathAssert<S>>\n+    extends AbstractAssert<S, Path>\n+{\n+    @VisibleForTesting\n+    protected Paths paths = Paths.instance();\n+\n+    protected AbstractPathAssert(final Path actual, final Class<?> selfType)\n+    {\n+        super(actual, selfType);\n+    }\n+\n+    /**\n+     * Assert that a given path exists\n+     *\n+     * <p><strong>IMPORTANT NOTE:</strong> this method will NOT follow symbolic\n+     * links (provided that the underlying {@link FileSystem} of this path\n+     * supports symbolic links at all).</p>\n+     *\n+     * <p>This means that even if the path in question is a symbolic link\n+     * but its target is nonexistent, this assertion will\n+     * <strong>succeed</strong>.</p>\n+     *\n+     * @return self\n+     *\n+     * @throws AssertionError path does not exist\n+     *\n+     * @see Files#exists(Path, LinkOption...)\n+     * @see LinkOption#NOFOLLOW_LINKS\n+     */\n+    public S exists()\n+    {\n+        paths.assertExists(info, actual);\n+        return myself;\n+    }\n+\n+    /**\n+     * Assert that a given path does not exist\n+     *\n+     * <p><strong>IMPORTANT NOTE:</strong> this method will NOT follow symbolic\n+     * links (provided that the underlying {@link FileSystem} of this path\n+     * supports symbolic links at all).</p>\n+     *\n+     * <p>This means that this assertion will return true even if the path is\n+     * a symbolic link but the target of the symbolic link does <em>not</em>\n+     * exist.</p>\n+     *","path":"src/main/java/org/assertj/core/api/AbstractPathAssert.java","position":72,"original_position":72,"commit_id":"e11f67e517ccc315b4427aa6621c407adffb820b","original_commit_id":"e11f67e517ccc315b4427aa6621c407adffb820b","user":{"login":"joel-costigliola","id":382613,"avatar_url":"https://avatars.githubusercontent.com/u/382613?v=3","gravatar_id":"","url":"https://api.github.com/users/joel-costigliola","html_url":"https://github.com/joel-costigliola","followers_url":"https://api.github.com/users/joel-costigliola/followers","following_url":"https://api.github.com/users/joel-costigliola/following{/other_user}","gists_url":"https://api.github.com/users/joel-costigliola/gists{/gist_id}","starred_url":"https://api.github.com/users/joel-costigliola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joel-costigliola/subscriptions","organizations_url":"https://api.github.com/users/joel-costigliola/orgs","repos_url":"https://api.github.com/users/joel-costigliola/repos","events_url":"https://api.github.com/users/joel-costigliola/events{/privacy}","received_events_url":"https://api.github.com/users/joel-costigliola/received_events","type":"User","site_admin":false},"body":"add code example including standard file and a symbolic link to illustrate the comment ","created_at":"2015-01-01T07:25:22Z","updated_at":"2015-01-01T07:25:22Z","html_url":"https://github.com/joel-costigliola/assertj-core/pull/303#discussion_r22398441","pull_request_url":"https://api.github.com/repos/joel-costigliola/assertj-core/pulls/303","_links":{"self":{"href":"https://api.github.com/repos/joel-costigliola/assertj-core/pulls/comments/22398441"},"html":{"href":"https://github.com/joel-costigliola/assertj-core/pull/303#discussion_r22398441"},"pull_request":{"href":"https://api.github.com/repos/joel-costigliola/assertj-core/pulls/303"}}},"pull_request":{"url":"https://api.github.com/repos/joel-costigliola/assertj-core/pulls/303","id":26440491,"html_url":"https://github.com/joel-costigliola/assertj-core/pull/303","diff_url":"https://github.com/joel-costigliola/assertj-core/pull/303.diff","patch_url":"https://github.com/joel-costigliola/assertj-core/pull/303.patch","issue_url":"https://api.github.com/repos/joel-costigliola/assertj-core/issues/303","number":303,"state":"open","locked":false,"title":"Skeleton PathAssert, plus tests -- NOT FOR INCLUSION. Yet.","user":{"login":"fge","id":550006,"avatar_url":"https://avatars.githubusercontent.com/u/550006?v=3","gravatar_id":"","url":"https://api.github.com/users/fge","html_url":"https://github.com/fge","followers_url":"https://api.github.com/users/fge/followers","following_url":"https://api.github.com/users/fge/following{/other_user}","gists_url":"https://api.github.com/users/fge/gists{/gist_id}","starred_url":"https://api.github.com/users/fge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fge/subscriptions","organizations_url":"https://api.github.com/users/fge/orgs","repos_url":"https://api.github.com/users/fge/repos","events_url":"https://api.github.com/users/fge/events{/privacy}","received_events_url":"https://api.github.com/users/fge/received_events","type":"User","site_admin":false},"body":"Skeleton based on existing code. I modeled it on FileAssert. In fact I saw nothing related to anything java.nio.file in the code, so I created it from scratch...\r\n\r\nPreview only. I know the coding style does not fit; knowing that I use IDEA, do you happen to have a style file available?\r\n\r\nAlso, about error messages: there seem to be a lot of factories; FileAssert seems to basically use one per message! Is that on purpose? Can I create a single factory for Path-specific operations (including exists, non exists and absolute)?\r\n\r\nPlease comment! I'll add more test when the base is good enough for you.","created_at":"2014-12-22T06:09:22Z","updated_at":"2015-01-01T07:25:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"73d9a528eff8558238481cf6ced4f1e86b25a6ca","assignee":null,"milestone":{"url":"https://api.github.com/repos/joel-costigliola/assertj-core/milestones/10","labels_url":"https://api.github.com/repos/joel-costigliola/assertj-core/milestones/10/labels","id":782768,"number":10,"title":"2.0","description":null,"creator":{"login":"joel-costigliola","id":382613,"avatar_url":"https://avatars.githubusercontent.com/u/382613?v=3","gravatar_id":"","url":"https://api.github.com/users/joel-costigliola","html_url":"https://github.com/joel-costigliola","followers_url":"https://api.github.com/users/joel-costigliola/followers","following_url":"https://api.github.com/users/joel-costigliola/following{/other_user}","gists_url":"https://api.github.com/users/joel-costigliola/gists{/gist_id}","starred_url":"https://api.github.com/users/joel-costigliola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joel-costigliola/subscriptions","organizations_url":"https://api.github.com/users/joel-costigliola/orgs","repos_url":"https://api.github.com/users/joel-costigliola/repos","events_url":"https://api.github.com/users/joel-costigliola/events{/privacy}","received_events_url":"https://api.github.com/users/joel-costigliola/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":11,"state":"open","created_at":"2014-09-08T21:36:13Z","updated_at":"2015-01-01T04:46:16Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/joel-costigliola/assertj-core/pulls/303/commits","review_comments_url":"https://api.github.com/repos/joel-costigliola/assertj-core/pulls/303/comments","review_comment_url":"https://api.github.com/repos/joel-costigliola/assertj-core/pulls/comments/{number}","comments_url":"https://api.github.com/repos/joel-costigliola/assertj-core/issues/303/comments","statuses_url":"https://api.github.com/repos/joel-costigliola/assertj-core/statuses/e11f67e517ccc315b4427aa6621c407adffb820b","head":{"label":"fge:topic/jsr203","ref":"topic/jsr203","sha":"e11f67e517ccc315b4427aa6621c407adffb820b","user":{"login":"fge","id":550006,"avatar_url":"https://avatars.githubusercontent.com/u/550006?v=3","gravatar_id":"","url":"https://api.github.com/users/fge","html_url":"https://github.com/fge","followers_url":"https://api.github.com/users/fge/followers","following_url":"https://api.github.com/users/fge/following{/other_user}","gists_url":"https://api.github.com/users/fge/gists{/gist_id}","starred_url":"https://api.github.com/users/fge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fge/subscriptions","organizations_url":"https://api.github.com/users/fge/orgs","repos_url":"https://api.github.com/users/fge/repos","events_url":"https://api.github.com/users/fge/events{/privacy}","received_events_url":"https://api.github.com/users/fge/received_events","type":"User","site_admin":false},"repo":{"id":28326655,"name":"assertj-core","full_name":"fge/assertj-core","owner":{"login":"fge","id":550006,"avatar_url":"https://avatars.githubusercontent.com/u/550006?v=3","gravatar_id":"","url":"https://api.github.com/users/fge","html_url":"https://github.com/fge","followers_url":"https://api.github.com/users/fge/followers","following_url":"https://api.github.com/users/fge/following{/other_user}","gists_url":"https://api.github.com/users/fge/gists{/gist_id}","starred_url":"https://api.github.com/users/fge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fge/subscriptions","organizations_url":"https://api.github.com/users/fge/orgs","repos_url":"https://api.github.com/users/fge/repos","events_url":"https://api.github.com/users/fge/events{/privacy}","received_events_url":"https://api.github.com/users/fge/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fge/assertj-core","description":"AssertJ is a library of assertions similar to fest-assert but providing a richer set of assertions.","fork":true,"url":"https://api.github.com/repos/fge/assertj-core","forks_url":"https://api.github.com/repos/fge/assertj-core/forks","keys_url":"https://api.github.com/repos/fge/assertj-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fge/assertj-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fge/assertj-core/teams","hooks_url":"https://api.github.com/repos/fge/assertj-core/hooks","issue_events_url":"https://api.github.com/repos/fge/assertj-core/issues/events{/number}","events_url":"https://api.github.com/repos/fge/assertj-core/events","assignees_url":"https://api.github.com/repos/fge/assertj-core/assignees{/user}","branches_url":"https://api.github.com/repos/fge/assertj-core/branches{/branch}","tags_url":"https://api.github.com/repos/fge/assertj-core/tags","blobs_url":"https://api.github.com/repos/fge/assertj-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fge/assertj-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fge/assertj-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/fge/assertj-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fge/assertj-core/statuses/{sha}","languages_url":"https://api.github.com/repos/fge/assertj-core/languages","stargazers_url":"https://api.github.com/repos/fge/assertj-core/stargazers","contributors_url":"https://api.github.com/repos/fge/assertj-core/contributors","subscribers_url":"https://api.github.com/repos/fge/assertj-core/subscribers","subscription_url":"https://api.github.com/repos/fge/assertj-core/subscription","commits_url":"https://api.github.com/repos/fge/assertj-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/fge/assertj-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/fge/assertj-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/fge/assertj-core/issues/comments/{number}","contents_url":"https://api.github.com/repos/fge/assertj-core/contents/{+path}","compare_url":"https://api.github.com/repos/fge/assertj-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fge/assertj-core/merges","archive_url":"https://api.github.com/repos/fge/assertj-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fge/assertj-core/downloads","issues_url":"https://api.github.com/repos/fge/assertj-core/issues{/number}","pulls_url":"https://api.github.com/repos/fge/assertj-core/pulls{/number}","milestones_url":"https://api.github.com/repos/fge/assertj-core/milestones{/number}","notifications_url":"https://api.github.com/repos/fge/assertj-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fge/assertj-core/labels{/name}","releases_url":"https://api.github.com/repos/fge/assertj-core/releases{/id}","created_at":"2014-12-22T06:04:50Z","updated_at":"2014-12-22T06:04:54Z","pushed_at":"2015-01-01T07:19:12Z","git_url":"git://github.com/fge/assertj-core.git","ssh_url":"git@github.com:fge/assertj-core.git","clone_url":"https://github.com/fge/assertj-core.git","svn_url":"https://github.com/fge/assertj-core","homepage":"","size":12971,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"joel-costigliola:master","ref":"master","sha":"30554ca9cb61176a15693309d013d2dbdaf14249","user":{"login":"joel-costigliola","id":382613,"avatar_url":"https://avatars.githubusercontent.com/u/382613?v=3","gravatar_id":"","url":"https://api.github.com/users/joel-costigliola","html_url":"https://github.com/joel-costigliola","followers_url":"https://api.github.com/users/joel-costigliola/followers","following_url":"https://api.github.com/users/joel-costigliola/following{/other_user}","gists_url":"https://api.github.com/users/joel-costigliola/gists{/gist_id}","starred_url":"https://api.github.com/users/joel-costigliola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joel-costigliola/subscriptions","organizations_url":"https://api.github.com/users/joel-costigliola/orgs","repos_url":"https://api.github.com/users/joel-costigliola/repos","events_url":"https://api.github.com/users/joel-costigliola/events{/privacy}","received_events_url":"https://api.github.com/users/joel-costigliola/received_events","type":"User","site_admin":false},"repo":{"id":8779606,"name":"assertj-core","full_name":"joel-costigliola/assertj-core","owner":{"login":"joel-costigliola","id":382613,"avatar_url":"https://avatars.githubusercontent.com/u/382613?v=3","gravatar_id":"","url":"https://api.github.com/users/joel-costigliola","html_url":"https://github.com/joel-costigliola","followers_url":"https://api.github.com/users/joel-costigliola/followers","following_url":"https://api.github.com/users/joel-costigliola/following{/other_user}","gists_url":"https://api.github.com/users/joel-costigliola/gists{/gist_id}","starred_url":"https://api.github.com/users/joel-costigliola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joel-costigliola/subscriptions","organizations_url":"https://api.github.com/users/joel-costigliola/orgs","repos_url":"https://api.github.com/users/joel-costigliola/repos","events_url":"https://api.github.com/users/joel-costigliola/events{/privacy}","received_events_url":"https://api.github.com/users/joel-costigliola/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joel-costigliola/assertj-core","description":"AssertJ is a library of assertions similar to fest-assert but providing a richer set of assertions.","fork":false,"url":"https://api.github.com/repos/joel-costigliola/assertj-core","forks_url":"https://api.github.com/repos/joel-costigliola/assertj-core/forks","keys_url":"https://api.github.com/repos/joel-costigliola/assertj-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joel-costigliola/assertj-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joel-costigliola/assertj-core/teams","hooks_url":"https://api.github.com/repos/joel-costigliola/assertj-core/hooks","issue_events_url":"https://api.github.com/repos/joel-costigliola/assertj-core/issues/events{/number}","events_url":"https://api.github.com/repos/joel-costigliola/assertj-core/events","assignees_url":"https://api.github.com/repos/joel-costigliola/assertj-core/assignees{/user}","branches_url":"https://api.github.com/repos/joel-costigliola/assertj-core/branches{/branch}","tags_url":"https://api.github.com/repos/joel-costigliola/assertj-core/tags","blobs_url":"https://api.github.com/repos/joel-costigliola/assertj-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joel-costigliola/assertj-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joel-costigliola/assertj-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/joel-costigliola/assertj-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joel-costigliola/assertj-core/statuses/{sha}","languages_url":"https://api.github.com/repos/joel-costigliola/assertj-core/languages","stargazers_url":"https://api.github.com/repos/joel-costigliola/assertj-core/stargazers","contributors_url":"https://api.github.com/repos/joel-costigliola/assertj-core/contributors","subscribers_url":"https://api.github.com/repos/joel-costigliola/assertj-core/subscribers","subscription_url":"https://api.github.com/repos/joel-costigliola/assertj-core/subscription","commits_url":"https://api.github.com/repos/joel-costigliola/assertj-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/joel-costigliola/assertj-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/joel-costigliola/assertj-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/joel-costigliola/assertj-core/issues/comments/{number}","contents_url":"https://api.github.com/repos/joel-costigliola/assertj-core/contents/{+path}","compare_url":"https://api.github.com/repos/joel-costigliola/assertj-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joel-costigliola/assertj-core/merges","archive_url":"https://api.github.com/repos/joel-costigliola/assertj-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joel-costigliola/assertj-core/downloads","issues_url":"https://api.github.com/repos/joel-costigliola/assertj-core/issues{/number}","pulls_url":"https://api.github.com/repos/joel-costigliola/assertj-core/pulls{/number}","milestones_url":"https://api.github.com/repos/joel-costigliola/assertj-core/milestones{/number}","notifications_url":"https://api.github.com/repos/joel-costigliola/assertj-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joel-costigliola/assertj-core/labels{/name}","releases_url":"https://api.github.com/repos/joel-costigliola/assertj-core/releases{/id}","created_at":"2013-03-14T16:18:49Z","updated_at":"2014-12-31T17:40:57Z","pushed_at":"2014-12-28T05:01:27Z","git_url":"git://github.com/joel-costigliola/assertj-core.git","ssh_url":"git@github.com:joel-costigliola/assertj-core.git","clone_url":"https://github.com/joel-costigliola/assertj-core.git","svn_url":"https://github.com/joel-costigliola/assertj-core","homepage":"","size":19925,"stargazers_count":330,"watchers_count":330,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":88,"mirror_url":null,"open_issues_count":45,"forks":88,"open_issues":45,"watchers":330,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/joel-costigliola/assertj-core/pulls/303"},"html":{"href":"https://github.com/joel-costigliola/assertj-core/pull/303"},"issue":{"href":"https://api.github.com/repos/joel-costigliola/assertj-core/issues/303"},"comments":{"href":"https://api.github.com/repos/joel-costigliola/assertj-core/issues/303/comments"},"review_comments":{"href":"https://api.github.com/repos/joel-costigliola/assertj-core/pulls/303/comments"},"review_comment":{"href":"https://api.github.com/repos/joel-costigliola/assertj-core/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/joel-costigliola/assertj-core/pulls/303/commits"},"statuses":{"href":"https://api.github.com/repos/joel-costigliola/assertj-core/statuses/e11f67e517ccc315b4427aa6621c407adffb820b"}}}}