FileService.UpdateAsync method (1 of 2)
Update an already existing File and Get the file from the FileSystem asynchronously
public Task<IFileMetaData> UpdateAsync(string fileName, string fileType, byte[] bytes,
bool throwOnException = true, bool throwOnNotFound = true)
parameter | description |
---|---|
fileName | Name of the file (with extension). Eg: file.zip |
fileType | The Type of the file |
stream | Data to be written into the file |
throwOnException | Indicates whether an Exception should be thrown upon errors. Default:true |
throwOnNotFound | Indicates whether an Exeption should be thrown if the file is not found.Default:true |
Return Value
IFileMetaData
See Also
- class FileService
- namespace DotNetOpen.FileService
FileService.UpdateAsync method (2 of 2)
Move a file within root
public Task<IFileMetaData> UpdateAsync(string fileName, string fileType, Stream stream,
bool throwOnException = true, bool throwOnNotFound = true)
parameter | description |
---|---|
fileName | Name of the file |
oldFileType | The current Type of the file |
newFileType | The new Type of the file |
throwOnException | Indicates whether an Exception should be thrown upon errors. Default:true |
throwOnNotFound | Indicates whether an Exeption should be thrown if the file is not found.Default:true |
Return Value
IFileMetaData
See Also
- class FileService
- namespace DotNetOpen.FileService