C# Class NSoft.NFramework.Parallelism.Tools.FileAsync

APM 방식의 비동기 파일 작업을 제공합니다.
참고 사이트 : http://msdn.microsoft.com/ko-kr/library/ms228963.aspx http://msdn.microsoft.com/ko-kr/library/dd997423.aspx
Datei anzeigen Open project: debop/NFramework Class Usage Examples

Public Methods

Method Description
OpenRead ( string path ) : FileStream

비동기적으로 읽기 위한 FileStream 을 생성합니다.

OpenWrite ( string path ) : FileStream

지정한 파일을 비동기적으로 쓰기 위한 FileStream을 생성합니다.

ReadAllBytes ( string path ) : Task

지정한 파일을 비동기적으로 읽어 byte[] 을 반환하는 Task를 빌드합니다.

ReadAllText ( string path, Encoding encoding = null ) : Task

지정한 경로의 파일 내용을 비동기적으로 모두 읽어 문자열로 반환하는 Task를 빌드합니다.

WriteAllBytes ( string path, byte bytes ) : System.Threading.Tasks.Task

비동기적으로 bytes 내용을 파일에 씁니다.

WriteAllText ( string path, string contents, Encoding encoding = null ) : System.Threading.Tasks.Task

비동기적으로 지정된 내용을 지정된 인코딩 방식으로 파일에 씁니다.

Method Details

OpenRead() public static method

비동기적으로 읽기 위한 FileStream 을 생성합니다.
public static OpenRead ( string path ) : FileStream
path string
return System.IO.FileStream

OpenWrite() public static method

지정한 파일을 비동기적으로 쓰기 위한 FileStream을 생성합니다.
public static OpenWrite ( string path ) : FileStream
path string
return System.IO.FileStream

ReadAllBytes() public static method

지정한 파일을 비동기적으로 읽어 byte[] 을 반환하는 Task를 빌드합니다.
public static ReadAllBytes ( string path ) : Task
path string
return Task

ReadAllText() public static method

지정한 경로의 파일 내용을 비동기적으로 모두 읽어 문자열로 반환하는 Task를 빌드합니다.
public static ReadAllText ( string path, Encoding encoding = null ) : Task
path string 읽을 파일 전체경로
encoding System.Text.Encoding 파일 내용 인코딩 방식
return Task

WriteAllBytes() public static method

비동기적으로 bytes 내용을 파일에 씁니다.
public static WriteAllBytes ( string path, byte bytes ) : System.Threading.Tasks.Task
path string
bytes byte
return System.Threading.Tasks.Task

WriteAllText() public static method

비동기적으로 지정된 내용을 지정된 인코딩 방식으로 파일에 씁니다.
public static WriteAllText ( string path, string contents, Encoding encoding = null ) : System.Threading.Tasks.Task
path string 경로
contents string 쓸 내용
encoding System.Text.Encoding 인코딩 방식
return System.Threading.Tasks.Task