C# Class SharpUV.File

Inheritance: IDisposable
Show file Open project: gigi81/sharpuv

Public Methods

Method Description
Close ( Action callback = null ) : void

Closes the stream. After this call the stream will not be valid

Dispose ( ) : void

Dispose the object freeing unmanaged resources allocated

File ( ) : System
File ( Loop loop ) : System
Open ( string path, FileAccessMode access, FileOpenMode mode, FilePermissions permissions, Action callback = null ) : void
OpenAppend ( string path, Action callback = null ) : void
OpenRead ( string path, Action callback = null ) : void
OpenWrite ( string path, Action callback = null ) : void
Read ( Action callback = null ) : void
Read ( uint length, Action callback = null ) : void

Read from the file

Write ( byte data, Action callback = null ) : void
Write ( byte data, int offset, int length, Action callback = null ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void
OnClose ( UvArgs args ) : void
OnOpen ( UvArgs args ) : void
OnRead ( UvDataArgs args ) : void
OnWrite ( UvDataArgs args ) : void

Private Methods

Method Description
CheckError ( int code ) : void
CreateRequest ( ) : IntPtr
CreateRequest ( byte data, int offset, int length ) : IntPtr
CreateRequest ( uint length ) : IntPtr
FreeReadRequest ( IntPtr req ) : UvDataArgs
FreeRequest ( IntPtr req ) : Int32
InitDelegates ( ) : void
OnClose ( IntPtr req ) : void
OnOpen ( IntPtr req ) : void
OnRead ( IntPtr req ) : void
OnWrite ( IntPtr req ) : void
uv_fs_open ( Loop loop, IntPtr req, string path, FileAccessMode rw, FileOpenMode open, FilePermissions permissions, uv_fs_cb cb ) : int

Method Details

Close() public method

Closes the stream. After this call the stream will not be valid
public Close ( Action callback = null ) : void
callback Action
return void

Dispose() public method

Dispose the object freeing unmanaged resources allocated
public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

File() public method

public File ( ) : System
return System

File() public method

public File ( Loop loop ) : System
loop Loop
return System

OnClose() protected method

protected OnClose ( UvArgs args ) : void
args UvArgs
return void

OnOpen() protected method

protected OnOpen ( UvArgs args ) : void
args UvArgs
return void

OnRead() protected method

protected OnRead ( UvDataArgs args ) : void
args UvDataArgs
return void

OnWrite() protected method

protected OnWrite ( UvDataArgs args ) : void
args UvDataArgs
return void

Open() public method

public Open ( string path, FileAccessMode access, FileOpenMode mode, FilePermissions permissions, Action callback = null ) : void
path string
access FileAccessMode
mode FileOpenMode
permissions FilePermissions
callback Action
return void

OpenAppend() public method

public OpenAppend ( string path, Action callback = null ) : void
path string
callback Action
return void

OpenRead() public method

public OpenRead ( string path, Action callback = null ) : void
path string
callback Action
return void

OpenWrite() public method

public OpenWrite ( string path, Action callback = null ) : void
path string
callback Action
return void

Read() public method

public Read ( Action callback = null ) : void
callback Action
return void

Read() public method

Read from the file
public Read ( uint length, Action callback = null ) : void
length uint
callback Action
return void

Write() public method

public Write ( byte data, Action callback = null ) : void
data byte
callback Action
return void

Write() public method

public Write ( byte data, int offset, int length, Action callback = null ) : void
data byte
offset int
length int
callback Action
return void