{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/codeformatter/issues/167","labels_url":"https://api.github.com/repos/dotnet/codeformatter/issues/167/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/codeformatter/issues/167/comments","events_url":"https://api.github.com/repos/dotnet/codeformatter/issues/167/events","html_url":"https://github.com/dotnet/codeformatter/pull/167","id":99934646,"number":167,"title":"Add check for invalid file.","user":{"login":"paulvanbrenk","id":5273975,"avatar_url":"https://avatars.githubusercontent.com/u/5273975?v=3","gravatar_id":"","url":"https://api.github.com/users/paulvanbrenk","html_url":"https://github.com/paulvanbrenk","followers_url":"https://api.github.com/users/paulvanbrenk/followers","following_url":"https://api.github.com/users/paulvanbrenk/following{/other_user}","gists_url":"https://api.github.com/users/paulvanbrenk/gists{/gist_id}","starred_url":"https://api.github.com/users/paulvanbrenk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulvanbrenk/subscriptions","organizations_url":"https://api.github.com/users/paulvanbrenk/orgs","repos_url":"https://api.github.com/users/paulvanbrenk/repos","events_url":"https://api.github.com/users/paulvanbrenk/events{/privacy}","received_events_url":"https://api.github.com/users/paulvanbrenk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/codeformatter/labels/cla-already-signed","name":"cla-already-signed","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-09T22:07:33Z","updated_at":"2015-08-10T15:04:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dotnet/codeformatter/pulls/167","html_url":"https://github.com/dotnet/codeformatter/pull/167","diff_url":"https://github.com/dotnet/codeformatter/pull/167.diff","patch_url":"https://github.com/dotnet/codeformatter/pull/167.patch"},"body":"Instead of throwing an exception later, check if we can access the file specified as proj/solution/etc. "},"comment":{"url":"https://api.github.com/repos/dotnet/codeformatter/issues/comments/129483674","html_url":"https://github.com/dotnet/codeformatter/pull/167#issuecomment-129483674","issue_url":"https://api.github.com/repos/dotnet/codeformatter/issues/167","id":129483674,"user":{"login":"jaredpar","id":146967,"avatar_url":"https://avatars.githubusercontent.com/u/146967?v=3","gravatar_id":"","url":"https://api.github.com/users/jaredpar","html_url":"https://github.com/jaredpar","followers_url":"https://api.github.com/users/jaredpar/followers","following_url":"https://api.github.com/users/jaredpar/following{/other_user}","gists_url":"https://api.github.com/users/jaredpar/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredpar/subscriptions","organizations_url":"https://api.github.com/users/jaredpar/orgs","repos_url":"https://api.github.com/users/jaredpar/repos","events_url":"https://api.github.com/users/jaredpar/events{/privacy}","received_events_url":"https://api.github.com/users/jaredpar/received_events","type":"User","site_admin":false},"created_at":"2015-08-10T15:04:35Z","updated_at":"2015-08-10T15:04:35Z","body":"This change doesn't prevent the later exception.  It is always possible for the file to be delete after this check.  In general `File.Exists` or `FileInfo.Exists` is an API that should be avoided at all costs (it really should be deleted from the framework).  \r\n\r\nI think we should focus on the place where we actually read the file contents.  If the message / behavior is undesirable there then we should focus on improving it. \r\n"}}