{"action":"closed","issue":{"url":"https://api.github.com/repos/Azure/azure-storage-net/issues/240","repository_url":"https://api.github.com/repos/Azure/azure-storage-net","labels_url":"https://api.github.com/repos/Azure/azure-storage-net/issues/240/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-storage-net/issues/240/comments","events_url":"https://api.github.com/repos/Azure/azure-storage-net/issues/240/events","html_url":"https://github.com/Azure/azure-storage-net/issues/240","id":138730196,"number":240,"title":"Undocumented overwrite behaviour of CloudFile.OpenWrite method","user":{"login":"jnv","id":616767,"avatar_url":"https://avatars3.githubusercontent.com/u/616767?v=4","gravatar_id":"","url":"https://api.github.com/users/jnv","html_url":"https://github.com/jnv","followers_url":"https://api.github.com/users/jnv/followers","following_url":"https://api.github.com/users/jnv/following{/other_user}","gists_url":"https://api.github.com/users/jnv/gists{/gist_id}","starred_url":"https://api.github.com/users/jnv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnv/subscriptions","organizations_url":"https://api.github.com/users/jnv/orgs","repos_url":"https://api.github.com/users/jnv/repos","events_url":"https://api.github.com/users/jnv/events{/privacy}","received_events_url":"https://api.github.com/users/jnv/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"mirobers","id":1182250,"avatar_url":"https://avatars2.githubusercontent.com/u/1182250?v=4","gravatar_id":"","url":"https://api.github.com/users/mirobers","html_url":"https://github.com/mirobers","followers_url":"https://api.github.com/users/mirobers/followers","following_url":"https://api.github.com/users/mirobers/following{/other_user}","gists_url":"https://api.github.com/users/mirobers/gists{/gist_id}","starred_url":"https://api.github.com/users/mirobers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mirobers/subscriptions","organizations_url":"https://api.github.com/users/mirobers/orgs","repos_url":"https://api.github.com/users/mirobers/repos","events_url":"https://api.github.com/users/mirobers/events{/privacy}","received_events_url":"https://api.github.com/users/mirobers/received_events","type":"User","site_admin":false},"assignees":[{"login":"mirobers","id":1182250,"avatar_url":"https://avatars2.githubusercontent.com/u/1182250?v=4","gravatar_id":"","url":"https://api.github.com/users/mirobers","html_url":"https://github.com/mirobers","followers_url":"https://api.github.com/users/mirobers/followers","following_url":"https://api.github.com/users/mirobers/following{/other_user}","gists_url":"https://api.github.com/users/mirobers/gists{/gist_id}","starred_url":"https://api.github.com/users/mirobers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mirobers/subscriptions","organizations_url":"https://api.github.com/users/mirobers/orgs","repos_url":"https://api.github.com/users/mirobers/repos","events_url":"https://api.github.com/users/mirobers/events{/privacy}","received_events_url":"https://api.github.com/users/mirobers/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/Azure/azure-storage-net/milestones/2","html_url":"https://github.com/Azure/azure-storage-net/milestone/2","labels_url":"https://api.github.com/repos/Azure/azure-storage-net/milestones/2/labels","id":2259144,"number":2,"title":"9.0","description":"Major version release 9.0.","creator":{"login":"erezvani1529","id":7978554,"avatar_url":"https://avatars2.githubusercontent.com/u/7978554?v=4","gravatar_id":"","url":"https://api.github.com/users/erezvani1529","html_url":"https://github.com/erezvani1529","followers_url":"https://api.github.com/users/erezvani1529/followers","following_url":"https://api.github.com/users/erezvani1529/following{/other_user}","gists_url":"https://api.github.com/users/erezvani1529/gists{/gist_id}","starred_url":"https://api.github.com/users/erezvani1529/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erezvani1529/subscriptions","organizations_url":"https://api.github.com/users/erezvani1529/orgs","repos_url":"https://api.github.com/users/erezvani1529/repos","events_url":"https://api.github.com/users/erezvani1529/events{/privacy}","received_events_url":"https://api.github.com/users/erezvani1529/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":3,"state":"open","created_at":"2017-01-17T17:30:04Z","updated_at":"2018-02-07T22:13:38Z","due_on":"2018-01-15T08:00:00Z","closed_at":null},"comments":1,"created_at":"2016-03-05T22:36:37Z","updated_at":"2018-02-07T22:13:38Z","closed_at":"2018-02-07T22:13:37Z","author_association":"NONE","body":"I would like to append data to existing file in the storage, however the documentation for the `CloudFile.OpenWrite` method is quite fuzzy regarding the file overwrite:\n\n> Opens a stream for writing to the file. If the file already exists, then existing data in the file _may be overwritten_. [emphasis mine]\n\nNow, if you take a look at [the code](https://github.com/Azure/azure-storage-net/blob/e2c5a2ac9a96a105e73eb379b6f516a6ce31f632/Lib/ClassLibraryCommon/File/CloudFile.cs#L187-L191) the new file is created if the `size` parameter is specified. However, the documentation for the parameter states:\n\n> The size of the file, in bytes. If `null`, the file must already exist.\n\nI suggest the overwrite behaviour should be explicitly documented, e.g. for the `size` parameter:\n\n> The size of the new file, in bytes. If `null`, the file must already exist, otherwise a new file of the given size will be created.\n"}}
{"actor":{"display_login":"erezvani1529"}}