Prabhu
Prabhu

Reputation: 3538

Modify a file in SharePoint document library

I need to modify a file (text file) in a SharePoint document library. Tried to open a stream using SPFile.OpenBinaryStream() and write the data. But it doesn't work out. Any help/ suggestion would be appreciated.

Upvotes: 0

Views: 928

Answers (1)

DJ.
DJ.

Reputation: 664

Have you used the SaveBinary method?

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfile.savebinary.aspx

and depending on the doc library settings you may need to do a SPFile.CheckIn to commit the changes.

Upvotes: 1

Related Questions