This documentation is archived and is not being maintained.

SPFileCollection.Add Method (String, Stream, Hashtable)

Windows SharePoint Services 3

Creates a file in the collection based on the specified URL, a Stream object that contains a file, and a hash table that contains metadata for the file.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public SPFile Add(
	string urlOfFile,
	Stream stream,
	Hashtable properties


Type: System.String
A string that specifies the URL for the file.
Type: System.IO.Stream
A System.IO.Stream object that contains the file.
Type: System.Collections.Hashtable
A System.Collections.Hashtable object containing metadata for the file.

Return Value

Type: Microsoft.SharePoint.SPFile
An SPFile object that represents the file.