Class ArchiveTempFileProvider
This class implements the ITempFileProvider interface and makes
available temp file services. It uses the Document section in the config file
to determine impersonation options and file path.
Inheritance
ArchiveTempFileProvider
Assembly: SoDataBase.dll
Syntax
[TempFileProvider("SuperOffice:DocumentTemp")]
public class ArchiveTempFileProvider : ITempFileProvider, IPlugin
Constructors
ArchiveTempFileProvider()
Declaration
public ArchiveTempFileProvider()
Methods
CheckIfFileExists(String)
Declaration
public bool CheckIfFileExists(string name)
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
CreateFile(String)
Declaration
public string CreateFile(string name)
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
DeleteFile(String)
Declaration
public void DeleteFile(string name)
Parameters
Type |
Name |
Description |
String |
name |
|
EnsureDirectoryExists(DirectoryInfo)
Verify that a directory exists, and if not, create all missing folders
Declaration
public static void EnsureDirectoryExists(DirectoryInfo dirInfo)
Parameters
GetLength(String)
Get size of a temporary file
Declaration
public long GetLength(string name)
Parameters
Type |
Name |
Description |
String |
name |
filename
|
Returns
Type |
Description |
Int64 |
Size of file
|
ReadFileChunk(String, Int64, Byte[])
Declaration
public int ReadFileChunk(string name, long filePosition, byte[] bufferToUpdate)
Parameters
Returns
ReadFileComplete(String)
Declaration
public Stream ReadFileComplete(string name)
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
WriteFileChunk(String, Int64, Byte[])
Declaration
public void WriteFileChunk(string name, long filePosition, byte[] bufferToWriteFrom)
Parameters
Type |
Name |
Description |
String |
name |
|
Int64 |
filePosition |
|
Byte[] |
bufferToWriteFrom |
|
WriteFileComplete(String, Stream)
Copy all information from DATA stream into the temp file represented by NAME, and close the stream when done.
Declaration
public void WriteFileComplete(string name, Stream data)
Parameters
Type |
Name |
Description |
String |
name |
Temp file name
|
Stream |
data |
Stream to read to the end. This stream is CLOSED after it has been read.
|
Implements
Extension Methods
EnumUtil.MapEnums<From, To>(From)