This documentation is archived and is not being maintained.

SPFileCollection.Add Method

Windows SharePoint Services 3

Creates a file in the collection at the specified URL.

  NameDescription
Public method Add(String, SPTemplateFileType) Creates a file in the collection based on the specified URL and template file type.
Public method Add(String, []) Creates a file in the collection based on the specified URL and on a byte array that contains the file.
Public method Add(String, Stream) Creates a file in the collection based on the specified URL and on a Stream object that contains a file.
Public method Add(String, [], Boolean) Creates a file in the collection based on the specified URL and on a byte array that contains a file, overwriting any file of the same name only if overwrite is true.
Public method Add(String, [], Hashtable) Creates a file in the collection based on the specified URL, a byte array that contains a file, and a hash table that contains metadata for the file.
Public method Add(String, Stream, Boolean) Creates a file in the collection based on the specified URL and on a Stream object that contains a file, overwriting any file of the same name only if overwrite is true.
Public method Add(String, Stream, Hashtable) 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, [], Hashtable, Boolean) Creates a file in the collection based on the specified URL, a byte array that contains a file, and a hash table that contains metadata for the file, overwriting any file of the same name only if overwrite is true.
Public method Add(String, Stream, Hashtable, 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, overwriting any file of the same name only if overwrite is true.
Public method Add(String, [], Boolean, String, Boolean) Creates a file in the collection based on the specified URL, byte array that contains a file, check-in comment, and Boolean value specifying whether to check required fields, overwriting any file of the same name only if overwrite is true.
Public method Add(String, Stream, Boolean, String, Boolean) Creates a file in the collection based on the specified URL, Stream object that contains a file, check-in comment, and Boolean value specifying whether to check required fields, overwriting any file of the same name only if overwrite is true.
Public method Add(String, [], SPUser, SPUser, DateTime, DateTime) Creates a file in the collection based on the specified URL, on a byte array that contains a file, on user objects that represent the users who created and last modified the file, and on DateTime values that specify when they did so.
Public method Add(String, Stream, SPUser, SPUser, DateTime, DateTime) Creates a file in the collection based on the specified URL, on a Stream object that contains a file, on user objects that represent the users who created and last modified the file, and on DateTime values that specify when they did so.
Top
Show: