SPFileCollection.Add Method

Definition

Overloads

Add(String, SPTemplateFileType)
Add(String, Stream, Hashtable, SPUser, SPUser, DateTime, DateTime, String, Boolean, Boolean)
Add(String, Stream, Hashtable, SPUser, SPUser, DateTime, DateTime, String, Boolean)
Add(String, Byte[], Hashtable, SPUser, SPUser, DateTime, DateTime, Boolean)
Add(String, Stream, Boolean, Boolean, Stream, String)
Add(String, Stream, SPUser, SPUser, DateTime, DateTime)
Add(String, Byte[], SPUser, SPUser, DateTime, DateTime)
Add(String, Stream, Hashtable, Boolean, Boolean)
Add(String, Byte[], Boolean, String, Boolean)
Add(String, Stream, Hashtable, Boolean)
Add(String, Stream, Boolean, String, Boolean)
Add(String, Stream, Hashtable)
Add(String, Stream, Boolean)
Add(String, Stream, SPFileCollectionAddParameters)
Add(String, Byte[], Hashtable)
Add(String, Byte[], Boolean)
Add(String, Byte[], SPFileCollectionAddParameters)
Add(String, Stream)
Add(String, Byte[])
Add(String, Byte[], Hashtable, Boolean)

Add(String, SPTemplateFileType)

public:
 Microsoft::SharePoint::SPFile ^ Add(System::String ^ urlOfFile, Microsoft::SharePoint::SPTemplateFileType templateFileType);
[Microsoft.SharePoint.Client.ClientCallableMethod(AddReturnValueToCollection=true, Name="AddTemplateFile", ReturnObjectIdentity=true)]
public Microsoft.SharePoint.SPFile Add (string urlOfFile, Microsoft.SharePoint.SPTemplateFileType templateFileType);
member this.Add : string * Microsoft.SharePoint.SPTemplateFileType -> Microsoft.SharePoint.SPFile
Public Function Add (urlOfFile As String, templateFileType As SPTemplateFileType) As SPFile

Parameters

urlOfFile
String
templateFileType
SPTemplateFileType

Returns

SPFile
Attributes
ClientCallableMethodAttribute

Applies to

Add(String, Stream, Hashtable, SPUser, SPUser, DateTime, DateTime, String, Boolean, Boolean)

public:
 Microsoft::SharePoint::SPFile ^ Add(System::String ^ urlOfFile, System::IO::Stream ^ file, System::Collections::Hashtable ^ properties, Microsoft::SharePoint::SPUser ^ createdBy, Microsoft::SharePoint::SPUser ^ modifiedBy, DateTime timeCreated, DateTime timeLastModified, System::String ^ checkInComment, bool overwrite, bool requireWebFilePermissions);
[Microsoft.SharePoint.Client.SubsetCallableExcludeMember(Microsoft.SharePoint.Client.SubsetCallableExcludeMemberType.PerSpec)]
public Microsoft.SharePoint.SPFile Add (string urlOfFile, System.IO.Stream file, System.Collections.Hashtable properties, Microsoft.SharePoint.SPUser createdBy, Microsoft.SharePoint.SPUser modifiedBy, DateTime timeCreated, DateTime timeLastModified, string checkInComment, bool overwrite, bool requireWebFilePermissions);
member this.Add : string * System.IO.Stream * System.Collections.Hashtable * Microsoft.SharePoint.SPUser * Microsoft.SharePoint.SPUser * DateTime * DateTime * string * bool * bool -> Microsoft.SharePoint.SPFile
Public Function Add (urlOfFile As String, file As Stream, properties As Hashtable, createdBy As SPUser, modifiedBy As SPUser, timeCreated As DateTime, timeLastModified As DateTime, checkInComment As String, overwrite As Boolean, requireWebFilePermissions As Boolean) As SPFile

Parameters

urlOfFile
String
file
Stream
properties
Hashtable
createdBy
SPUser
modifiedBy
SPUser
timeCreated
DateTime
timeLastModified
DateTime
checkInComment
String
overwrite
Boolean
requireWebFilePermissions
Boolean

Returns

SPFile
Attributes
SubsetCallableExcludeMemberAttribute

Applies to

Add(String, Stream, Hashtable, SPUser, SPUser, DateTime, DateTime, String, Boolean)

public:
 Microsoft::SharePoint::SPFile ^ Add(System::String ^ urlOfFile, System::IO::Stream ^ file, System::Collections::Hashtable ^ properties, Microsoft::SharePoint::SPUser ^ createdBy, Microsoft::SharePoint::SPUser ^ modifiedBy, DateTime timeCreated, DateTime timeLastModified, System::String ^ checkInComment, bool overwrite);
[Microsoft.SharePoint.Client.SubsetCallableExcludeMember(Microsoft.SharePoint.Client.SubsetCallableExcludeMemberType.MarshalByRefObject)]
public Microsoft.SharePoint.SPFile Add (string urlOfFile, System.IO.Stream file, System.Collections.Hashtable properties, Microsoft.SharePoint.SPUser createdBy, Microsoft.SharePoint.SPUser modifiedBy, DateTime timeCreated, DateTime timeLastModified, string checkInComment, bool overwrite);
member this.Add : string * System.IO.Stream * System.Collections.Hashtable * Microsoft.SharePoint.SPUser * Microsoft.SharePoint.SPUser * DateTime * DateTime * string * bool -> Microsoft.SharePoint.SPFile
Public Function Add (urlOfFile As String, file As Stream, properties As Hashtable, createdBy As SPUser, modifiedBy As SPUser, timeCreated As DateTime, timeLastModified As DateTime, checkInComment As String, overwrite As Boolean) As SPFile

Parameters

urlOfFile
String
file
Stream
properties
Hashtable
createdBy
SPUser
modifiedBy
SPUser
timeCreated
DateTime
timeLastModified
DateTime
checkInComment
String
overwrite
Boolean

Returns

SPFile
Attributes
SubsetCallableExcludeMemberAttribute

Applies to

Add(String, Byte[], Hashtable, SPUser, SPUser, DateTime, DateTime, Boolean)

public:
 Microsoft::SharePoint::SPFile ^ Add(System::String ^ urlOfFile, cli::array <System::Byte> ^ file, System::Collections::Hashtable ^ properties, Microsoft::SharePoint::SPUser ^ createdBy, Microsoft::SharePoint::SPUser ^ modifiedBy, DateTime timeCreated, DateTime timeLastModified, bool overwrite);
public Microsoft.SharePoint.SPFile Add (string urlOfFile, byte[] file, System.Collections.Hashtable properties, Microsoft.SharePoint.SPUser createdBy, Microsoft.SharePoint.SPUser modifiedBy, DateTime timeCreated, DateTime timeLastModified, bool overwrite);
member this.Add : string * byte[] * System.Collections.Hashtable * Microsoft.SharePoint.SPUser * Microsoft.SharePoint.SPUser * DateTime * DateTime * bool -> Microsoft.SharePoint.SPFile
Public Function Add (urlOfFile As String, file As Byte(), properties As Hashtable, createdBy As SPUser, modifiedBy As SPUser, timeCreated As DateTime, timeLastModified As DateTime, overwrite As Boolean) As SPFile

Parameters

urlOfFile
String
file
Byte[]
properties
Hashtable
createdBy
SPUser
modifiedBy
SPUser
timeCreated
DateTime
timeLastModified
DateTime
overwrite
Boolean

Returns

SPFile

Applies to

Add(String, Stream, Boolean, Boolean, Stream, String)

public:
 Microsoft::SharePoint::SPFile ^ Add(System::String ^ urlOfFile, System::IO::Stream ^ file, bool overwrite, bool checkRequiredFields, System::IO::Stream ^ fileFormatMetaInfo, [Runtime::InteropServices::Out] System::String ^ % etagNew);
[Microsoft.SharePoint.Client.SubsetCallableExcludeMember(Microsoft.SharePoint.Client.SubsetCallableExcludeMemberType.MarshalByRefObject)]
public Microsoft.SharePoint.SPFile Add (string urlOfFile, System.IO.Stream file, bool overwrite, bool checkRequiredFields, System.IO.Stream fileFormatMetaInfo, out string etagNew);
member this.Add : string * System.IO.Stream * bool * bool * System.IO.Stream *  -> Microsoft.SharePoint.SPFile
Public Function Add (urlOfFile As String, file As Stream, overwrite As Boolean, checkRequiredFields As Boolean, fileFormatMetaInfo As Stream, ByRef etagNew As String) As SPFile

Parameters

urlOfFile
String
file
Stream
overwrite
Boolean
checkRequiredFields
Boolean
fileFormatMetaInfo
Stream
etagNew
String

Returns

SPFile
Attributes
SubsetCallableExcludeMemberAttribute

Applies to

Add(String, Stream, SPUser, SPUser, DateTime, DateTime)

public:
 Microsoft::SharePoint::SPFile ^ Add(System::String ^ urlOfFile, System::IO::Stream ^ file, Microsoft::SharePoint::SPUser ^ createdBy, Microsoft::SharePoint::SPUser ^ modifiedBy, DateTime timeCreated, DateTime timeLastModified);
[Microsoft.SharePoint.Client.SubsetCallableExcludeMember(Microsoft.SharePoint.Client.SubsetCallableExcludeMemberType.MarshalByRefObject)]
public Microsoft.SharePoint.SPFile Add (string urlOfFile, System.IO.Stream file, Microsoft.SharePoint.SPUser createdBy, Microsoft.SharePoint.SPUser modifiedBy, DateTime timeCreated, DateTime timeLastModified);
member this.Add : string * System.IO.Stream * Microsoft.SharePoint.SPUser * Microsoft.SharePoint.SPUser * DateTime * DateTime -> Microsoft.SharePoint.SPFile
Public Function Add (urlOfFile As String, file As Stream, createdBy As SPUser, modifiedBy As SPUser, timeCreated As DateTime, timeLastModified As DateTime) As SPFile

Parameters

urlOfFile
String
file
Stream
createdBy
SPUser
modifiedBy
SPUser
timeCreated
DateTime
timeLastModified
DateTime

Returns

SPFile
Attributes
SubsetCallableExcludeMemberAttribute

Applies to

Add(String, Byte[], SPUser, SPUser, DateTime, DateTime)

public:
 Microsoft::SharePoint::SPFile ^ Add(System::String ^ urlOfFile, cli::array <System::Byte> ^ file, Microsoft::SharePoint::SPUser ^ createdBy, Microsoft::SharePoint::SPUser ^ modifiedBy, DateTime timeCreated, DateTime timeLastModified);
public Microsoft.SharePoint.SPFile Add (string urlOfFile, byte[] file, Microsoft.SharePoint.SPUser createdBy, Microsoft.SharePoint.SPUser modifiedBy, DateTime timeCreated, DateTime timeLastModified);
member this.Add : string * byte[] * Microsoft.SharePoint.SPUser * Microsoft.SharePoint.SPUser * DateTime * DateTime -> Microsoft.SharePoint.SPFile
Public Function Add (urlOfFile As String, file As Byte(), createdBy As SPUser, modifiedBy As SPUser, timeCreated As DateTime, timeLastModified As DateTime) As SPFile

Parameters

urlOfFile
String
file
Byte[]
createdBy
SPUser
modifiedBy
SPUser
timeCreated
DateTime
timeLastModified
DateTime

Returns

SPFile

Applies to

Add(String, Stream, Hashtable, Boolean, Boolean)

public:
 Microsoft::SharePoint::SPFile ^ Add(System::String ^ urlOfFile, System::IO::Stream ^ file, System::Collections::Hashtable ^ properties, bool overwrite, bool requireWebFilePermissions);
[Microsoft.SharePoint.Client.SubsetCallableExcludeMember(Microsoft.SharePoint.Client.SubsetCallableExcludeMemberType.PerSpec)]
public Microsoft.SharePoint.SPFile Add (string urlOfFile, System.IO.Stream file, System.Collections.Hashtable properties, bool overwrite, bool requireWebFilePermissions);
member this.Add : string * System.IO.Stream * System.Collections.Hashtable * bool * bool -> Microsoft.SharePoint.SPFile
Public Function Add (urlOfFile As String, file As Stream, properties As Hashtable, overwrite As Boolean, requireWebFilePermissions As Boolean) As SPFile

Parameters

urlOfFile
String
file
Stream
properties
Hashtable
overwrite
Boolean
requireWebFilePermissions
Boolean

Returns

SPFile
Attributes
SubsetCallableExcludeMemberAttribute

Applies to

Add(String, Byte[], Boolean, String, Boolean)

public:
 Microsoft::SharePoint::SPFile ^ Add(System::String ^ urlOfFile, cli::array <System::Byte> ^ file, bool overwrite, System::String ^ checkInComment, bool checkRequiredFields);
public Microsoft.SharePoint.SPFile Add (string urlOfFile, byte[] file, bool overwrite, string checkInComment, bool checkRequiredFields);
member this.Add : string * byte[] * bool * string * bool -> Microsoft.SharePoint.SPFile
Public Function Add (urlOfFile As String, file As Byte(), overwrite As Boolean, checkInComment As String, checkRequiredFields As Boolean) As SPFile

Parameters

urlOfFile
String
file
Byte[]
overwrite
Boolean
checkInComment
String
checkRequiredFields
Boolean

Returns

SPFile

Applies to

Add(String, Stream, Hashtable, Boolean)

public:
 Microsoft::SharePoint::SPFile ^ Add(System::String ^ urlOfFile, System::IO::Stream ^ file, System::Collections::Hashtable ^ properties, bool overwrite);
[Microsoft.SharePoint.Client.SubsetCallableExcludeMember(Microsoft.SharePoint.Client.SubsetCallableExcludeMemberType.MarshalByRefObject)]
public Microsoft.SharePoint.SPFile Add (string urlOfFile, System.IO.Stream file, System.Collections.Hashtable properties, bool overwrite);
member this.Add : string * System.IO.Stream * System.Collections.Hashtable * bool -> Microsoft.SharePoint.SPFile
Public Function Add (urlOfFile As String, file As Stream, properties As Hashtable, overwrite As Boolean) As SPFile

Parameters

urlOfFile
String
file
Stream
properties
Hashtable
overwrite
Boolean

Returns

SPFile
Attributes
SubsetCallableExcludeMemberAttribute

Applies to

Add(String, Stream, Boolean, String, Boolean)

public:
 Microsoft::SharePoint::SPFile ^ Add(System::String ^ urlOfFile, System::IO::Stream ^ file, bool overwrite, System::String ^ checkInComment, bool checkRequiredFields);
[Microsoft.SharePoint.Client.SubsetCallableExcludeMember(Microsoft.SharePoint.Client.SubsetCallableExcludeMemberType.MarshalByRefObject)]
public Microsoft.SharePoint.SPFile Add (string urlOfFile, System.IO.Stream file, bool overwrite, string checkInComment, bool checkRequiredFields);
member this.Add : string * System.IO.Stream * bool * string * bool -> Microsoft.SharePoint.SPFile
Public Function Add (urlOfFile As String, file As Stream, overwrite As Boolean, checkInComment As String, checkRequiredFields As Boolean) As SPFile

Parameters

urlOfFile
String
file
Stream
overwrite
Boolean
checkInComment
String
checkRequiredFields
Boolean

Returns

SPFile
Attributes
SubsetCallableExcludeMemberAttribute

Applies to

Add(String, Stream, Hashtable)

public:
 Microsoft::SharePoint::SPFile ^ Add(System::String ^ urlOfFile, System::IO::Stream ^ file, System::Collections::Hashtable ^ properties);
[Microsoft.SharePoint.Client.SubsetCallableExcludeMember(Microsoft.SharePoint.Client.SubsetCallableExcludeMemberType.MarshalByRefObject)]
public Microsoft.SharePoint.SPFile Add (string urlOfFile, System.IO.Stream file, System.Collections.Hashtable properties);
member this.Add : string * System.IO.Stream * System.Collections.Hashtable -> Microsoft.SharePoint.SPFile
Public Function Add (urlOfFile As String, file As Stream, properties As Hashtable) As SPFile

Parameters

urlOfFile
String
file
Stream
properties
Hashtable

Returns

SPFile
Attributes
SubsetCallableExcludeMemberAttribute

Applies to

Add(String, Stream, Boolean)

public:
 Microsoft::SharePoint::SPFile ^ Add(System::String ^ urlOfFile, System::IO::Stream ^ file, bool overwrite);
[Microsoft.SharePoint.Client.SubsetCallableExcludeMember(Microsoft.SharePoint.Client.SubsetCallableExcludeMemberType.MarshalByRefObject)]
public Microsoft.SharePoint.SPFile Add (string urlOfFile, System.IO.Stream file, bool overwrite);
member this.Add : string * System.IO.Stream * bool -> Microsoft.SharePoint.SPFile
Public Function Add (urlOfFile As String, file As Stream, overwrite As Boolean) As SPFile

Parameters

urlOfFile
String
file
Stream
overwrite
Boolean

Returns

SPFile
Attributes
SubsetCallableExcludeMemberAttribute

Applies to

Add(String, Stream, SPFileCollectionAddParameters)

public:
 Microsoft::SharePoint::SPFile ^ Add(System::String ^ urlOfFile, System::IO::Stream ^ file, Microsoft::SharePoint::SPFileCollectionAddParameters ^ parameters);
[Microsoft.SharePoint.Client.SubsetCallableExcludeMember(Microsoft.SharePoint.Client.SubsetCallableExcludeMemberType.MarshalByRefObject)]
public Microsoft.SharePoint.SPFile Add (string urlOfFile, System.IO.Stream file, Microsoft.SharePoint.SPFileCollectionAddParameters parameters);
member this.Add : string * System.IO.Stream * Microsoft.SharePoint.SPFileCollectionAddParameters -> Microsoft.SharePoint.SPFile
Public Function Add (urlOfFile As String, file As Stream, parameters As SPFileCollectionAddParameters) As SPFile

Parameters

urlOfFile
String
file
Stream

Returns

SPFile
Attributes
SubsetCallableExcludeMemberAttribute

Applies to

Add(String, Byte[], Hashtable)

public:
 Microsoft::SharePoint::SPFile ^ Add(System::String ^ urlOfFile, cli::array <System::Byte> ^ file, System::Collections::Hashtable ^ properties);
public Microsoft.SharePoint.SPFile Add (string urlOfFile, byte[] file, System.Collections.Hashtable properties);
member this.Add : string * byte[] * System.Collections.Hashtable -> Microsoft.SharePoint.SPFile
Public Function Add (urlOfFile As String, file As Byte(), properties As Hashtable) As SPFile

Parameters

urlOfFile
String
file
Byte[]
properties
Hashtable

Returns

SPFile

Applies to

Add(String, Byte[], Boolean)

public:
 Microsoft::SharePoint::SPFile ^ Add(System::String ^ urlOfFile, cli::array <System::Byte> ^ file, bool overwrite);
public Microsoft.SharePoint.SPFile Add (string urlOfFile, byte[] file, bool overwrite);
member this.Add : string * byte[] * bool -> Microsoft.SharePoint.SPFile
Public Function Add (urlOfFile As String, file As Byte(), overwrite As Boolean) As SPFile

Parameters

urlOfFile
String
file
Byte[]
overwrite
Boolean

Returns

SPFile

Applies to

Add(String, Byte[], SPFileCollectionAddParameters)

public:
 Microsoft::SharePoint::SPFile ^ Add(System::String ^ urlOfFile, cli::array <System::Byte> ^ file, Microsoft::SharePoint::SPFileCollectionAddParameters ^ parameters);
public Microsoft.SharePoint.SPFile Add (string urlOfFile, byte[] file, Microsoft.SharePoint.SPFileCollectionAddParameters parameters);
member this.Add : string * byte[] * Microsoft.SharePoint.SPFileCollectionAddParameters -> Microsoft.SharePoint.SPFile
Public Function Add (urlOfFile As String, file As Byte(), parameters As SPFileCollectionAddParameters) As SPFile

Parameters

urlOfFile
String
file
Byte[]

Returns

SPFile

Applies to

Add(String, Stream)

public:
 Microsoft::SharePoint::SPFile ^ Add(System::String ^ urlOfFile, System::IO::Stream ^ file);
[Microsoft.SharePoint.Client.SubsetCallableExcludeMember(Microsoft.SharePoint.Client.SubsetCallableExcludeMemberType.MarshalByRefObject)]
public Microsoft.SharePoint.SPFile Add (string urlOfFile, System.IO.Stream file);
member this.Add : string * System.IO.Stream -> Microsoft.SharePoint.SPFile
Public Function Add (urlOfFile As String, file As Stream) As SPFile

Parameters

urlOfFile
String
file
Stream

Returns

SPFile
Attributes
SubsetCallableExcludeMemberAttribute

Applies to

Add(String, Byte[])

public:
 Microsoft::SharePoint::SPFile ^ Add(System::String ^ urlOfFile, cli::array <System::Byte> ^ file);
public Microsoft.SharePoint.SPFile Add (string urlOfFile, byte[] file);
member this.Add : string * byte[] -> Microsoft.SharePoint.SPFile
Public Function Add (urlOfFile As String, file As Byte()) As SPFile

Parameters

urlOfFile
String
file
Byte[]

Returns

SPFile

Applies to

Add(String, Byte[], Hashtable, Boolean)

public:
 Microsoft::SharePoint::SPFile ^ Add(System::String ^ urlOfFile, cli::array <System::Byte> ^ file, System::Collections::Hashtable ^ properties, bool overwrite);
public Microsoft.SharePoint.SPFile Add (string urlOfFile, byte[] file, System.Collections.Hashtable properties, bool overwrite);
member this.Add : string * byte[] * System.Collections.Hashtable * bool -> Microsoft.SharePoint.SPFile
Public Function Add (urlOfFile As String, file As Byte(), properties As Hashtable, overwrite As Boolean) As SPFile

Parameters

urlOfFile
String
file
Byte[]
properties
Hashtable
overwrite
Boolean

Returns

SPFile

Applies to