C# Class Patcher.Data.DataFile

显示文件 Open project: unforbidable/patcher

Public Methods

Method Description
CopyFrom ( Stream input, bool updateOnly ) : bool

Copies a stream into the current data file, optionally only if does not exists and contains different data.

Delete ( ) : void
Exists ( ) : bool
GetRelativePath ( ) : string
GetRelativePath ( string path ) : string
Open ( ) : FileStream

Private Methods

Method Description
DataFile ( IDataFileProvider provider, FileMode mode, string fullPath, string requestedPath ) : System
EnsureDirectoryExists ( string path ) : void

Method Details

CopyFrom() public method

Copies a stream into the current data file, optionally only if does not exists and contains different data.
public CopyFrom ( Stream input, bool updateOnly ) : bool
input Stream The Stream to copy data from.
updateOnly bool If true, file will not be recreated if already exists and contains the same data.
return bool

Delete() public method

public Delete ( ) : void
return void

Exists() public method

public Exists ( ) : bool
return bool

GetRelativePath() public method

public GetRelativePath ( ) : string
return string

GetRelativePath() public static method

public static GetRelativePath ( string path ) : string
path string
return string

Open() public method

public Open ( ) : FileStream
return System.IO.FileStream