Partilhar via


SPFileCollection.Add Method

Include Protected Members
Include Inherited Members

Creates a file in the collection.

Overload List

  Name Description
Public method Add(String, SPTemplateFileType) Creates a file in the collection using the specified URL and template file type.
Public method Add(String, []) Creates a file in the collection using the specified URL and a byte array that contains the file.
Public method Add(String, Stream) Creates a file in the collection using the specified URL and a stream that contains the contents of a file.
Public method Add(String, [], SPFileCollectionAddParameters) Creates a file in the collection using the specified URL, a byte array that contains the contents of a file, and an SPFileCollectionAddParameters object.
Public method Add(String, [], Boolean) Creates a file in the collection using the specified URL, a byte array that contains the contents of a file, and a Boolean value that specifies whether to overwrite any file that has the same name.
Public method Add(String, [], Hashtable) Creates a file in the collection using the specified URL, a byte array that contains the contents of a file, and a hash table that contains metadata for the file.
Public method Add(String, Stream, SPFileCollectionAddParameters) Creates a file in the collection using the specified URL, a stream that contains the contents of a file, and an SPFileCollectionAddParameters object.
Public method Add(String, Stream, Boolean) Creates a file in the collection using the specified URL, a stream that contains the contents of a file, and a Boolean value that specifies whether to overwrite any file that has the same name.
Public method Add(String, Stream, Hashtable) Creates a file in the collection using the specified URL, a stream that contains the contents of a file, and a hash table that contains metadata for the file.
Public method Add(String, [], Hashtable, Boolean) Creates a file in the collection using the specified URL, a byte array that contains the contents of a file, a hash table that contains metadata for the file, and a Boolean value that specifies whether to overwrite any file that has the same name.
Public method Add(String, Stream, Hashtable, Boolean) Creates a file in the collection using the specified URL, a stream that contains the contents of a file, a hash table that contains metadata for the file, and a Boolean value that specifies whether to overwrite any file that has the same name.
Public method Add(String, [], Boolean, String, Boolean) Creates a file in the collection using the specified URL, a byte array that contains the contents of a file, a Boolean value that specifies whether to overwrite any file that has the same name, a check-in comment, and a Boolean value that specifies whether to check required fields.
Public method Add(String, Stream, Boolean, String, Boolean) Creates a file in the collection using the specified URL, a stream that contains the contents of a file, a Boolean value that specifies whether to overwrite any file that has the same name, a check-in comment, and a Boolean value that specifies whether to check required fields.
Public method Add(String, Stream, Hashtable, Boolean, Boolean) 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.
Public method Add(String, [], SPUser, SPUser, DateTime, DateTime) Creates a file in the collection using the specified URL, a byte array that contains the contents of a file, user objects that represent the users who created and last modified the file, and DateTime values that specify when they did so.
Public method Add(String, Stream, SPUser, SPUser, DateTime, DateTime) Creates a file in the collection using the specified URL, a stream that contains the contents of a file, user objects that represent the users who created and last modified the file, and DateTime values that specify when they did so.
Public method Add(String, Stream, Boolean, Boolean, Stream, String) Creates a file in the collection using the specified URL, a stream that contains the contents of a file, a Boolean value that specifies whether to overwrite any file that has the same name, a Boolean value that specifies whether to check required fields, a stream that contains file format metadata, and an output variable to receive an ETag.
Public method Add(String, [], Hashtable, SPUser, SPUser, DateTime, DateTime, Boolean) Creates a file in the collection using the specified URL, a byte array that contains the contents of a file, a hash table that contains metadata for the file, user objects that represent the users who created and last modified the file, DateTime values that specify when they did so, and a Boolean value that specifies whether to overwrite any file that has the same name.
Public method Add(String, Stream, Hashtable, SPUser, SPUser, DateTime, DateTime, String, Boolean) Creates a file in the collection using the specified URL, a stream that contains the contents of a file, a hash table that contains metadata for the file, user objects that represent the users who created and last modified the file, DateTime values that specify when they did so, a check-in comment, and a Boolean value that specifies whether to overwrite any file that has the same name.
Public method Add(String, Stream, Hashtable, SPUser, SPUser, DateTime, DateTime, String, Boolean, Boolean) Creates a file in the collection based on the specified URL, on a Stream object that contains a file, a Hashtable object that contains metadata for the file, on SPUser objects that represent the users who created and last modified the file, and on DateTime values that specify when they did so.

Top

See Also

Reference

SPFileCollection Class

SPFileCollection Members

Microsoft.SharePoint Namespace