C# Class Recognos.Core.FileUtilities

Utilities for handling files
Afficher le fichier Open project: Recognos/Recognos.Core

Méthodes publiques

Méthode Description
ReadBinaryContent ( this stream ) : byte[]

Reads the content from the stream as binary.

ReadBinaryContentAsync ( this stream ) : Task

Reads the content from the stream as binary.

ReadContent ( this stream ) : string

Reads the content from the stream.

ReadContent ( this stream, Encoding encoding ) : string

Reads the content from the stream.

ReadContentAsync ( this stream ) : Task

Reads the content from the stream.

ReadContentAsync ( this stream, Encoding encoding ) : Task

Reads the content from the stream.

SaveToFile ( this stream, string pathToFile ) : void

Saves a stream to a file.

SaveToFileAsync ( this stream, string pathToFile ) : System.Threading.Tasks.Task

Saves a stream to a file.

SaveToStream ( this stream, Stream outputStream ) : void

Saves a stream to another stream.

SaveToStreamAsync ( this stream, Stream outputStream ) : System.Threading.Tasks.Task

Saves a stream to another stream.

Private Methods

Méthode Description
ComputeSHA1Hash ( string pathToFile ) : string
ComputeSHA1Hash ( this stream ) : string

Method Details

ReadBinaryContent() public static méthode

Reads the content from the stream as binary.
public static ReadBinaryContent ( this stream ) : byte[]
stream this The stream.
Résultat byte[]

ReadBinaryContentAsync() public static méthode

Reads the content from the stream as binary.
public static ReadBinaryContentAsync ( this stream ) : Task
stream this The stream.
Résultat Task

ReadContent() public static méthode

Reads the content from the stream.
public static ReadContent ( this stream ) : string
stream this The stream.
Résultat string

ReadContent() public static méthode

Reads the content from the stream.
public static ReadContent ( this stream, Encoding encoding ) : string
stream this The stream.
encoding System.Text.Encoding The encoding.
Résultat string

ReadContentAsync() public static méthode

Reads the content from the stream.
public static ReadContentAsync ( this stream ) : Task
stream this The stream.
Résultat Task

ReadContentAsync() public static méthode

Reads the content from the stream.
public static ReadContentAsync ( this stream, Encoding encoding ) : Task
stream this The stream.
encoding System.Text.Encoding The encoding.
Résultat Task

SaveToFile() public static méthode

Saves a stream to a file.
public static SaveToFile ( this stream, string pathToFile ) : void
stream this The stream.
pathToFile string The path to file.
Résultat void

SaveToFileAsync() public static méthode

Saves a stream to a file.
public static SaveToFileAsync ( this stream, string pathToFile ) : System.Threading.Tasks.Task
stream this The stream.
pathToFile string The path to file.
Résultat System.Threading.Tasks.Task

SaveToStream() public static méthode

Saves a stream to another stream.
public static SaveToStream ( this stream, Stream outputStream ) : void
stream this The input stream.
outputStream System.IO.Stream The output stream.
Résultat void

SaveToStreamAsync() public static méthode

Saves a stream to another stream.
public static SaveToStreamAsync ( this stream, Stream outputStream ) : System.Threading.Tasks.Task
stream this The input stream.
outputStream System.IO.Stream The output stream.
Résultat System.Threading.Tasks.Task