{"action":"created","issue":{"url":"https://api.github.com/repos/hierynomus/smbj/issues/106","repository_url":"https://api.github.com/repos/hierynomus/smbj","labels_url":"https://api.github.com/repos/hierynomus/smbj/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/hierynomus/smbj/issues/106/comments","events_url":"https://api.github.com/repos/hierynomus/smbj/issues/106/events","html_url":"https://github.com/hierynomus/smbj/issues/106","id":237824890,"number":106,"title":"Overwrite existing file ","user":{"login":"NadigNikhil","id":29628506,"avatar_url":"https://avatars2.githubusercontent.com/u/29628506?v=3","gravatar_id":"","url":"https://api.github.com/users/NadigNikhil","html_url":"https://github.com/NadigNikhil","followers_url":"https://api.github.com/users/NadigNikhil/followers","following_url":"https://api.github.com/users/NadigNikhil/following{/other_user}","gists_url":"https://api.github.com/users/NadigNikhil/gists{/gist_id}","starred_url":"https://api.github.com/users/NadigNikhil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NadigNikhil/subscriptions","organizations_url":"https://api.github.com/users/NadigNikhil/orgs","repos_url":"https://api.github.com/users/NadigNikhil/repos","events_url":"https://api.github.com/users/NadigNikhil/events{/privacy}","received_events_url":"https://api.github.com/users/NadigNikhil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-06-22T12:10:50Z","updated_at":"2017-06-23T06:33:47Z","closed_at":null,"body":"Hi,\r\n\r\nI'm using the below code to overwrite an existing file. I'm getting the below exception. Kindly help me fix the issue.\r\n\r\nCode:\r\n\r\n```\r\nSMBClient client = new SMBClient();\r\n            Connection con = client.connect(\"ipAddress\");\r\n            AuthenticationContext context = new AuthenticationContext(\"username\", \"pwd\".toCharArray(), \"WORKGROUP\");\r\n            Session ses = con.authenticate(context);\r\n            DiskShare share = (DiskShare) ses.connectShare(\"\\\\TEST_File\");\r\n            File file = share.openFile(\"TestFolder/TestFl1/1/1.txt\", EnumSet.of(AccessMask.GENERIC_WRITE, AccessMask.MAXIMUM_ALLOWED), SMB2CreateDisposition.FILE_OVERWRITE);\r\n            System.out.println(file.getFileId());\r\n```\r\n\r\nException:\r\ncom.hierynomus.smbj.common.SMBApiException: STATUS_SHARING_VIOLATION(3221225539/3221225539): Create failed for TestFolder/1.txt"},"comment":{"url":"https://api.github.com/repos/hierynomus/smbj/issues/comments/310584169","html_url":"https://github.com/hierynomus/smbj/issues/106#issuecomment-310584169","issue_url":"https://api.github.com/repos/hierynomus/smbj/issues/106","id":310584169,"user":{"login":"hierynomus","id":117667,"avatar_url":"https://avatars3.githubusercontent.com/u/117667?v=3","gravatar_id":"","url":"https://api.github.com/users/hierynomus","html_url":"https://github.com/hierynomus","followers_url":"https://api.github.com/users/hierynomus/followers","following_url":"https://api.github.com/users/hierynomus/following{/other_user}","gists_url":"https://api.github.com/users/hierynomus/gists{/gist_id}","starred_url":"https://api.github.com/users/hierynomus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hierynomus/subscriptions","organizations_url":"https://api.github.com/users/hierynomus/orgs","repos_url":"https://api.github.com/users/hierynomus/repos","events_url":"https://api.github.com/users/hierynomus/events{/privacy}","received_events_url":"https://api.github.com/users/hierynomus/received_events","type":"User","site_admin":false},"created_at":"2017-06-23T06:33:46Z","updated_at":"2017-06-23T06:33:46Z","body":"Should not be too long. I aim for end of this month.\n\n\n\nOp 23 jun. 2017 08:11 schreef \"NadigNikhil\" <notifications@github.com>:\n\n> @pepijnve <https://github.com/pepijnve> Thanks for the update, but we\n> need to give a feature in our product where the user can overwrite an\n> existing file. When is the next release planned with the new feature?\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/hierynomus/smbj/issues/106#issuecomment-310580950>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AAHLo61aAIdGSf9TEd56vwsPHnwX8fxWks5sG1b0gaJpZM4OCNKy>\n> .\n>\n"}}
{"actor":{"display_login":"hierynomus"}}