{"action":"created","comment":{"url":"https://api.github.com/repos/square/spoon/pulls/comments/36810721","id":36810721,"diff_hunk":"@@ -327,14 +384,15 @@ private void adbPull(IDevice device, FileEntry remoteDirName, String localDirNam\n     }\n   }\n \n-  private FileEntry getScreenshotDirOnInternalStorage() {\n+  private FileEntry getScreenshotDirOnInternalStorage(final String dir) {\n     String appPackage = instrumentationInfo.getApplicationPackage();\n-    String internalPath = \"/data/data/\" + appPackage + \"/\" + SCREENSHOT_DIR;\n+    String internalPath = \"/data/data/\" + appPackage + \"/\" + dir;\n     return obtainDirectoryFileEntry(internalPath);\n   }\n \n-  private static FileEntry getScreenshotDirOnExternalStorage(IDevice device) throws Exception {\n-    String externalPath = getExternalStoragePath(device) + \"/\" + SCREENSHOT_DIR;\n+  private static FileEntry getScreenshotDirOnExternalStorage(IDevice device,","path":"spoon-runner/src/main/java/com/squareup/spoon/SpoonDeviceRunner.java","position":258,"original_position":258,"commit_id":"2dd31b28ce20563c5c649fb5d2dde7a0435f9cc4","original_commit_id":"2dd31b28ce20563c5c649fb5d2dde7a0435f9cc4","user":{"login":"edenman","id":1063557,"avatar_url":"https://avatars.githubusercontent.com/u/1063557?v=3","gravatar_id":"","url":"https://api.github.com/users/edenman","html_url":"https://github.com/edenman","followers_url":"https://api.github.com/users/edenman/followers","following_url":"https://api.github.com/users/edenman/following{/other_user}","gists_url":"https://api.github.com/users/edenman/gists{/gist_id}","starred_url":"https://api.github.com/users/edenman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edenman/subscriptions","organizations_url":"https://api.github.com/users/edenman/orgs","repos_url":"https://api.github.com/users/edenman/repos","events_url":"https://api.github.com/users/edenman/events{/privacy}","received_events_url":"https://api.github.com/users/edenman/received_events","type":"User","site_admin":false},"body":"```\r\n  private static FileEntry getScreenshotDirOnExternalStorage(IDevice device, final String dir)\r\n      throws Exception {\r\n```","created_at":"2015-08-11T23:09:58Z","updated_at":"2015-08-11T23:09:58Z","html_url":"https://github.com/square/spoon/pull/281#discussion_r36810721","pull_request_url":"https://api.github.com/repos/square/spoon/pulls/281","_links":{"self":{"href":"https://api.github.com/repos/square/spoon/pulls/comments/36810721"},"html":{"href":"https://github.com/square/spoon/pull/281#discussion_r36810721"},"pull_request":{"href":"https://api.github.com/repos/square/spoon/pulls/281"}}},"pull_request":{"url":"https://api.github.com/repos/square/spoon/pulls/281","id":41627445,"html_url":"https://github.com/square/spoon/pull/281","diff_url":"https://github.com/square/spoon/pull/281.diff","patch_url":"https://github.com/square/spoon/pull/281.patch","issue_url":"https://api.github.com/repos/square/spoon/issues/281","number":281,"state":"open","locked":false,"title":"Support saving files from test to report","user":{"login":"sveinungkb","id":526922,"avatar_url":"https://avatars.githubusercontent.com/u/526922?v=3","gravatar_id":"","url":"https://api.github.com/users/sveinungkb","html_url":"https://github.com/sveinungkb","followers_url":"https://api.github.com/users/sveinungkb/followers","following_url":"https://api.github.com/users/sveinungkb/following{/other_user}","gists_url":"https://api.github.com/users/sveinungkb/gists{/gist_id}","starred_url":"https://api.github.com/users/sveinungkb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sveinungkb/subscriptions","organizations_url":"https://api.github.com/users/sveinungkb/orgs","repos_url":"https://api.github.com/users/sveinungkb/repos","events_url":"https://api.github.com/users/sveinungkb/events{/privacy}","received_events_url":"https://api.github.com/users/sveinungkb/received_events","type":"User","site_admin":false},"body":"This will need some polish probably, but working concept of how files can be saved from any test with.\r\nConsider it a spark for discussion or contribution.\r\nRequired some refactoring to how files are pulled to support image + files folder.\r\n\r\n`Spoon.save(getInstrumentation().getTargetContext(), someFile);`\r\n\r\nAnd then attached to the report:\r\n\r\n![https://www.dropbox.com/s/ygbp4eznpixycd9/Screenshot%202015-08-04%2018.57.41.png?dl=1](https://www.dropbox.com/s/ygbp4eznpixycd9/Screenshot%202015-08-04%2018.57.41.png?dl=1)","created_at":"2015-08-04T22:59:42Z","updated_at":"2015-08-11T23:09:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"00a06f18dfd2c4408d1ccc57d3c266dee66fc551","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/square/spoon/pulls/281/commits","review_comments_url":"https://api.github.com/repos/square/spoon/pulls/281/comments","review_comment_url":"https://api.github.com/repos/square/spoon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/square/spoon/issues/281/comments","statuses_url":"https://api.github.com/repos/square/spoon/statuses/2dd31b28ce20563c5c649fb5d2dde7a0435f9cc4","head":{"label":"usebutton:skb/save-files","ref":"skb/save-files","sha":"2dd31b28ce20563c5c649fb5d2dde7a0435f9cc4","user":{"login":"usebutton","id":7770987,"avatar_url":"https://avatars.githubusercontent.com/u/7770987?v=3","gravatar_id":"","url":"https://api.github.com/users/usebutton","html_url":"https://github.com/usebutton","followers_url":"https://api.github.com/users/usebutton/followers","following_url":"https://api.github.com/users/usebutton/following{/other_user}","gists_url":"https://api.github.com/users/usebutton/gists{/gist_id}","starred_url":"https://api.github.com/users/usebutton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/usebutton/subscriptions","organizations_url":"https://api.github.com/users/usebutton/orgs","repos_url":"https://api.github.com/users/usebutton/repos","events_url":"https://api.github.com/users/usebutton/events{/privacy}","received_events_url":"https://api.github.com/users/usebutton/received_events","type":"Organization","site_admin":false},"repo":{"id":40212797,"name":"spoon","full_name":"usebutton/spoon","owner":{"login":"usebutton","id":7770987,"avatar_url":"https://avatars.githubusercontent.com/u/7770987?v=3","gravatar_id":"","url":"https://api.github.com/users/usebutton","html_url":"https://github.com/usebutton","followers_url":"https://api.github.com/users/usebutton/followers","following_url":"https://api.github.com/users/usebutton/following{/other_user}","gists_url":"https://api.github.com/users/usebutton/gists{/gist_id}","starred_url":"https://api.github.com/users/usebutton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/usebutton/subscriptions","organizations_url":"https://api.github.com/users/usebutton/orgs","repos_url":"https://api.github.com/users/usebutton/repos","events_url":"https://api.github.com/users/usebutton/events{/privacy}","received_events_url":"https://api.github.com/users/usebutton/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/usebutton/spoon","description":"Distributing instrumentation tests to all your Androids.","fork":true,"url":"https://api.github.com/repos/usebutton/spoon","forks_url":"https://api.github.com/repos/usebutton/spoon/forks","keys_url":"https://api.github.com/repos/usebutton/spoon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/usebutton/spoon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/usebutton/spoon/teams","hooks_url":"https://api.github.com/repos/usebutton/spoon/hooks","issue_events_url":"https://api.github.com/repos/usebutton/spoon/issues/events{/number}","events_url":"https://api.github.com/repos/usebutton/spoon/events","assignees_url":"https://api.github.com/repos/usebutton/spoon/assignees{/user}","branches_url":"https://api.github.com/repos/usebutton/spoon/branches{/branch}","tags_url":"https://api.github.com/repos/usebutton/spoon/tags","blobs_url":"https://api.github.com/repos/usebutton/spoon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/usebutton/spoon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/usebutton/spoon/git/refs{/sha}","trees_url":"https://api.github.com/repos/usebutton/spoon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/usebutton/spoon/statuses/{sha}","languages_url":"https://api.github.com/repos/usebutton/spoon/languages","stargazers_url":"https://api.github.com/repos/usebutton/spoon/stargazers","contributors_url":"https://api.github.com/repos/usebutton/spoon/contributors","subscribers_url":"https://api.github.com/repos/usebutton/spoon/subscribers","subscription_url":"https://api.github.com/repos/usebutton/spoon/subscription","commits_url":"https://api.github.com/repos/usebutton/spoon/commits{/sha}","git_commits_url":"https://api.github.com/repos/usebutton/spoon/git/commits{/sha}","comments_url":"https://api.github.com/repos/usebutton/spoon/comments{/number}","issue_comment_url":"https://api.github.com/repos/usebutton/spoon/issues/comments{/number}","contents_url":"https://api.github.com/repos/usebutton/spoon/contents/{+path}","compare_url":"https://api.github.com/repos/usebutton/spoon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/usebutton/spoon/merges","archive_url":"https://api.github.com/repos/usebutton/spoon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/usebutton/spoon/downloads","issues_url":"https://api.github.com/repos/usebutton/spoon/issues{/number}","pulls_url":"https://api.github.com/repos/usebutton/spoon/pulls{/number}","milestones_url":"https://api.github.com/repos/usebutton/spoon/milestones{/number}","notifications_url":"https://api.github.com/repos/usebutton/spoon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/usebutton/spoon/labels{/name}","releases_url":"https://api.github.com/repos/usebutton/spoon/releases{/id}","created_at":"2015-08-04T22:47:52Z","updated_at":"2015-08-04T22:47:58Z","pushed_at":"2015-08-05T17:43:38Z","git_url":"git://github.com/usebutton/spoon.git","ssh_url":"git@github.com:usebutton/spoon.git","clone_url":"https://github.com/usebutton/spoon.git","svn_url":"https://github.com/usebutton/spoon","homepage":"http://square.github.io/spoon/","size":38362,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"square:master","ref":"master","sha":"ecf21f639c72783d8960fc842201f2b9e65aab63","user":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":7764585,"name":"spoon","full_name":"square/spoon","owner":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/square/spoon","description":"Distributing instrumentation tests to all your Androids.","fork":false,"url":"https://api.github.com/repos/square/spoon","forks_url":"https://api.github.com/repos/square/spoon/forks","keys_url":"https://api.github.com/repos/square/spoon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/spoon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/spoon/teams","hooks_url":"https://api.github.com/repos/square/spoon/hooks","issue_events_url":"https://api.github.com/repos/square/spoon/issues/events{/number}","events_url":"https://api.github.com/repos/square/spoon/events","assignees_url":"https://api.github.com/repos/square/spoon/assignees{/user}","branches_url":"https://api.github.com/repos/square/spoon/branches{/branch}","tags_url":"https://api.github.com/repos/square/spoon/tags","blobs_url":"https://api.github.com/repos/square/spoon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/spoon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/spoon/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/spoon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/spoon/statuses/{sha}","languages_url":"https://api.github.com/repos/square/spoon/languages","stargazers_url":"https://api.github.com/repos/square/spoon/stargazers","contributors_url":"https://api.github.com/repos/square/spoon/contributors","subscribers_url":"https://api.github.com/repos/square/spoon/subscribers","subscription_url":"https://api.github.com/repos/square/spoon/subscription","commits_url":"https://api.github.com/repos/square/spoon/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/spoon/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/spoon/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/spoon/issues/comments{/number}","contents_url":"https://api.github.com/repos/square/spoon/contents/{+path}","compare_url":"https://api.github.com/repos/square/spoon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/spoon/merges","archive_url":"https://api.github.com/repos/square/spoon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/spoon/downloads","issues_url":"https://api.github.com/repos/square/spoon/issues{/number}","pulls_url":"https://api.github.com/repos/square/spoon/pulls{/number}","milestones_url":"https://api.github.com/repos/square/spoon/milestones{/number}","notifications_url":"https://api.github.com/repos/square/spoon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/spoon/labels{/name}","releases_url":"https://api.github.com/repos/square/spoon/releases{/id}","created_at":"2013-01-23T00:29:36Z","updated_at":"2015-08-11T02:47:04Z","pushed_at":"2015-08-05T17:43:39Z","git_url":"git://github.com/square/spoon.git","ssh_url":"git@github.com:square/spoon.git","clone_url":"https://github.com/square/spoon.git","svn_url":"https://github.com/square/spoon","homepage":"http://square.github.io/spoon/","size":41954,"stargazers_count":1275,"watchers_count":1275,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":252,"mirror_url":null,"open_issues_count":50,"forks":252,"open_issues":50,"watchers":1275,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/square/spoon/pulls/281"},"html":{"href":"https://github.com/square/spoon/pull/281"},"issue":{"href":"https://api.github.com/repos/square/spoon/issues/281"},"comments":{"href":"https://api.github.com/repos/square/spoon/issues/281/comments"},"review_comments":{"href":"https://api.github.com/repos/square/spoon/pulls/281/comments"},"review_comment":{"href":"https://api.github.com/repos/square/spoon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/square/spoon/pulls/281/commits"},"statuses":{"href":"https://api.github.com/repos/square/spoon/statuses/2dd31b28ce20563c5c649fb5d2dde7a0435f9cc4"}}}}