A class of the Microsoft.SharePoint namespace that represents a file in a SharePoint Web site that can be a Web Parts page, an item in a document library, or a file in a folder.

learn more… | top users | synonyms

5
votes
1answer
4k views

SPFile.CopyTo() vs RootFolder.Files.Add()

I've been looking for method of copying a file or folder from one document library to a number of other libraries with the same name in each subsite for a particular site collection. What needs to ...
4
votes
1answer
108 views

Can we unlock a ShortTerm lock via CSOM for SP2013

We are using SP2013 with OWA installed. Users often complain about a file stored in SharePiont being locked by another user not in office. Error is "The file "xxxx" is locked for exclusive use by ...
2
votes
1answer
10k views

Get all documents from a sharepoint document library

I want to retrieve all the existing documents from an SPDocumentLibrary in order to print them so I've tried this way but then I got stucked : using (SPSite mysite = SPContext.Current.Site) { ...
0
votes
1answer
891 views

SPWeb.GetFile for an old version of file

I have a document library with enabled versioning, I added an xml file, then added it again, but I have edited one value in it. Now I would like to get the content of both files in C# to compare them. ...
0
votes
2answers
830 views

Differentiate in ItemUpdated (ER) if file was edited or overwritted

I've an ItemUpdated Event Receiver, and I need to make different operations depending if the file was updated throw UI or overwritted. Is there any internal field that reflects this 2 different ...