AzureBlobFileSystem.AzureBlobStorageProvider.AzureBlobFileStorage.CreateFile C# (CSharp) Method

CreateFile() public method

public CreateFile ( ) : Stream
return Stream
            public Stream CreateFile()
            {
                // as opposed to the File System implementation, if nothing is done on the stream
                // the file will be emptied, because Azure doesn't implement FileMode.Truncate
                _blob.DeleteIfExists();
                _blob = _blob.Container.GetBlockBlobReference(_blob.Uri.ToString());
                _blob.OpenWrite().Dispose(); // force file creation

                return OpenWrite();
            }