Adds a file to the specified folder.
Namespace: DotNetNuke.Services.FileSystemAssembly: DotNetNuke (in DotNetNuke.dll)
Syntax
C# |
---|
IFileInfo AddFile( IFolderInfo folder, string fileName, Stream fileContent, bool overwrite, bool checkPermissions, string contentType, int createdByUserID ) |
Visual Basic |
---|
Function AddFile ( folder As IFolderInfo, fileName As String, fileContent As Stream, overwrite As Boolean, checkPermissions As Boolean, contentType As String, createdByUserID As Integer ) As IFileInfo |
Parameters
- folder
- Type: DotNetNuke.Services.FileSystem..::..IFolderInfo
The folder where to add the file.
- fileName
- Type: System..::..String
The name of the file.
- fileContent
- Type: System.IO..::..Stream
The content of the file.
- overwrite
- Type: System..::..Boolean
Indicates if the file has to be over-written if it exists.
- checkPermissions
- Type: System..::..Boolean
Indicates if permissions have to be met.
- contentType
- Type: System..::..String
The content type of the file.
- createdByUserID
- Type: System..::..Int32
ID of the user that creates the file