Class FileManager
Assembly: DotNetNuke.dll
Syntax
public class FileManager : ComponentBase<IFileManager, FileManager>, IFileManager
Constructors
FileManager()
Declaration
Properties
ContentTypes
Declaration
public virtual IDictionary<string, string> ContentTypes { get; }
Property Value
WhiteList
Declaration
public FileExtensionWhitelist WhiteList { get; }
Property Value
Methods
AddFile(IFolderInfo, string, Stream)
Declaration
public virtual IFileInfo AddFile(IFolderInfo folder, string fileName, Stream fileContent)
Parameters
Returns
AddFile(IFolderInfo, string, Stream, bool)
Declaration
public virtual IFileInfo AddFile(IFolderInfo folder, string fileName, Stream fileContent, bool overwrite)
Parameters
Returns
AddFile(IFolderInfo, string, Stream, bool, bool, bool, string, int)
Declaration
public virtual IFileInfo AddFile(IFolderInfo folder, string fileName, Stream fileContent, bool overwrite, bool checkPermissions, bool ignoreWhiteList, string contentType, int createdByUserID)
Parameters
Returns
AddFile(IFolderInfo, string, Stream, bool, bool, string)
Declaration
public virtual IFileInfo AddFile(IFolderInfo folder, string fileName, Stream fileContent, bool overwrite, bool checkPermissions, string contentType)
Parameters
Returns
AddFile(IFolderInfo, string, Stream, bool, bool, string, int)
Declaration
public virtual IFileInfo AddFile(IFolderInfo folder, string fileName, Stream fileContent, bool overwrite, bool checkPermissions, string contentType, int createdByUserID)
Parameters
Returns
CopyFile(IFileInfo, IFolderInfo)
Declaration
public virtual IFileInfo CopyFile(IFileInfo file, IFolderInfo destinationFolder)
Parameters
Returns
DeleteFile(IFileInfo)
Declaration
public virtual void DeleteFile(IFileInfo file)
Parameters
DeleteFiles(IEnumerable<IFileInfo>)
Declaration
public virtual void DeleteFiles(IEnumerable<IFileInfo> files)
Parameters
FileExists(IFolderInfo, string)
Declaration
public virtual bool FileExists(IFolderInfo folder, string fileName)
Parameters
Returns
FileExists(IFolderInfo, string, bool)
Declaration
public virtual bool FileExists(IFolderInfo folder, string fileName, bool retrieveUnpublishedFiles)
Parameters
Returns
GetContentType(string)
Declaration
public virtual string GetContentType(string extension)
Parameters
Type |
Name |
Description |
string |
extension |
|
Returns
GetFile(IFolderInfo, string)
Declaration
public virtual IFileInfo GetFile(IFolderInfo folder, string fileName)
Parameters
Returns
GetFile(IFolderInfo, string, bool)
Declaration
public virtual IFileInfo GetFile(IFolderInfo folder, string fileName, bool retrieveUnpublishedFiles)
Parameters
Returns
GetFile(int)
Declaration
public virtual IFileInfo GetFile(int fileID)
Parameters
Type |
Name |
Description |
int |
fileID |
|
Returns
GetFile(int, bool)
Declaration
public virtual IFileInfo GetFile(int fileID, bool retrieveUnpublishedFiles)
Parameters
Type |
Name |
Description |
int |
fileID |
|
bool |
retrieveUnpublishedFiles |
|
Returns
GetFile(int, string)
Declaration
public virtual IFileInfo GetFile(int portalId, string relativePath)
Parameters
Type |
Name |
Description |
int |
portalId |
|
string |
relativePath |
|
Returns
GetFile(int, string, bool)
Declaration
public virtual IFileInfo GetFile(int portalId, string relativePath, bool retrieveUnpublishedFiles)
Parameters
Type |
Name |
Description |
int |
portalId |
|
string |
relativePath |
|
bool |
retrieveUnpublishedFiles |
|
Returns
GetFileContent(IFileInfo)
Declaration
public virtual Stream GetFileContent(IFileInfo file)
Parameters
Returns
GetSeekableStream(Stream)
Declaration
public virtual Stream GetSeekableStream(Stream stream)
Parameters
Type |
Name |
Description |
Stream |
stream |
|
Returns
GetUrl(IFileInfo)
Declaration
public string GetUrl(IFileInfo file)
Parameters
Returns
IsImageFile(IFileInfo)
Declaration
public virtual bool IsImageFile(IFileInfo file)
Parameters
Returns
MoveFile(IFileInfo, IFolderInfo)
Declaration
public virtual IFileInfo MoveFile(IFileInfo file, IFolderInfo destinationFolder)
Parameters
Returns
RenameFile(IFileInfo, string)
Declaration
public virtual IFileInfo RenameFile(IFileInfo file, string newFileName)
Parameters
Returns
SetAttributes(IFileInfo, FileAttributes)
Declaration
public void SetAttributes(IFileInfo file, FileAttributes fileAttributes)
Parameters
UnzipFile(IFileInfo)
Declaration
public virtual void UnzipFile(IFileInfo file)
Parameters
UnzipFile(IFileInfo, IFolderInfo)
Declaration
public virtual void UnzipFile(IFileInfo file, IFolderInfo destinationFolder)
Parameters
UnzipFile(IFileInfo, IFolderInfo, IList<string>)
Declaration
public virtual int UnzipFile(IFileInfo file, IFolderInfo destinationFolder, IList<string> invalidFiles)
Parameters
Returns
UpdateFile(IFileInfo)
Declaration
public virtual IFileInfo UpdateFile(IFileInfo file)
Parameters
Returns
UpdateFile(IFileInfo, Stream)
Declaration
public virtual IFileInfo UpdateFile(IFileInfo file, Stream fileContent)
Parameters
Returns
WriteFile(IFileInfo, Stream)
Declaration
public virtual void WriteFile(IFileInfo file, Stream stream)
Parameters
WriteFileToResponse(IFileInfo, ContentDisposition)
Declaration
public virtual void WriteFileToResponse(IFileInfo file, ContentDisposition contentDisposition)
Parameters
Implements
Extension Methods