C# Class DotNetIO.FileExtensions

Extensions for File
Exibir arquivo Open project: DotNetIO/DotNetIO

Public Methods

Method Description
OpenAppend ( this file ) : Stream
OpenRead ( this file ) : Stream
OpenWrite ( this file ) : Stream
ReadAllLines ( string filePath ) : IEnumerable
ReadAllLinesEnumerable ( string filePath ) : IEnumerable
ReadAllText ( string path, Encoding encoding ) : string
ReadAllText ( this file ) : string

WriteAllText ( this file, string contents ) : void
WriteStream ( string targetPath, Stream sourceStream ) : int

Method Details

OpenAppend() public static method

public static OpenAppend ( this file ) : Stream
file this
return Stream

OpenRead() public static method

public static OpenRead ( this file ) : Stream
file this
return Stream

OpenWrite() public static method

public static OpenWrite ( this file ) : Stream
file this
return Stream

ReadAllLines() public static method

public static ReadAllLines ( string filePath ) : IEnumerable
filePath string
return IEnumerable

ReadAllLinesEnumerable() public static method

public static ReadAllLinesEnumerable ( string filePath ) : IEnumerable
filePath string
return IEnumerable

ReadAllText() public static method

public static ReadAllText ( string path, Encoding encoding ) : string
path string
encoding System.Text.Encoding
return string

ReadAllText() public static method

There is insufficient memory to allocate a buffer for the returned string. An IO error occrs
public static ReadAllText ( this file ) : string
file this Invokee, the file that is to be fully read.
return string

WriteAllText() public static method

public static WriteAllText ( this file, string contents ) : void
file this
contents string
return void

WriteStream() public static method

public static WriteStream ( string targetPath, Stream sourceStream ) : int
targetPath string
sourceStream Stream
return int