{"comment":{"url":"https://api.github.com/repos/smithlabcode/smithlab_cpp/comments/14316801","html_url":"https://github.com/smithlabcode/smithlab_cpp/commit/50dd2442de85ee361685538c4971817b094db841#commitcomment-14316801","id":14316801,"user":{"login":"bdecato","id":7364304,"avatar_url":"https://avatars.githubusercontent.com/u/7364304?v=3","gravatar_id":"","url":"https://api.github.com/users/bdecato","html_url":"https://github.com/bdecato","followers_url":"https://api.github.com/users/bdecato/followers","following_url":"https://api.github.com/users/bdecato/following{/other_user}","gists_url":"https://api.github.com/users/bdecato/gists{/gist_id}","starred_url":"https://api.github.com/users/bdecato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdecato/subscriptions","organizations_url":"https://api.github.com/users/bdecato/orgs","repos_url":"https://api.github.com/users/bdecato/repos","events_url":"https://api.github.com/users/bdecato/events{/privacy}","received_events_url":"https://api.github.com/users/bdecato/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"50dd2442de85ee361685538c4971817b094db841","created_at":"2015-11-10T23:23:56Z","updated_at":"2015-11-10T23:23:56Z","body":"If the file does not exist before running access(filename, W_OK), the function will return -1.  So in order to use it, we need to create the file first if it doesn't yet exist. @andrewdavidsmith we decided against using stat, but check this out:\r\n\r\nhttp://stackoverflow.com/questions/12774207/fastest-way-to-check-if-a-file-exist-using-standard-c-c11-c\r\n\r\nWe could use the C++14 solution:\r\nstd::experimental::filesystem::exists(\"helloworld.txt\");\r\n\r\nDoes this work?  We need to fix this ASAP before people start using the new version."}}