C# Class FilesManagement.FileManager

Inheritance: IFileManager
Mostra file Open project: LeagueOfDevelopers/LodCore

Public Methods

Method Description
FileManager ( FileStorageSettings fileStorageSettings, IImageResizer imageResizer ) : Common.System
GetFile ( string fileName ) : Stream
GetImage ( string imageName ) : Stream
UploadFileAsync ( HttpContent content ) : Task
UploadImageAsync ( HttpContent content ) : Task

Private Methods

Method Description
CreateFoldersIfNeeded ( ) : void
GenerateRandomFileName ( string fileName ) : string
GetAnyFile ( string folderPath, string fileName ) : Stream
GetFileExtension ( string fileName ) : string
RenameFile ( string originalFullName, string newFileFullName ) : void
SaltFileNameWithCurrentDate ( string fileName ) : string
UploadAnyFileAsync ( HttpContent httpContent, string allowedExtensions, string folderPath ) : Task

Method Details

FileManager() public method

public FileManager ( FileStorageSettings fileStorageSettings, IImageResizer imageResizer ) : Common.System
fileStorageSettings FileStorageSettings
imageResizer IImageResizer
return Common.System

GetFile() public method

public GetFile ( string fileName ) : Stream
fileName string
return Stream

GetImage() public method

public GetImage ( string imageName ) : Stream
imageName string
return Stream

UploadFileAsync() public method

public UploadFileAsync ( HttpContent content ) : Task
content System.Net.Http.HttpContent
return Task

UploadImageAsync() public method

public UploadImageAsync ( HttpContent content ) : Task
content System.Net.Http.HttpContent
return Task