C# 클래스 DrutNET.DrutNETBase

Base Class with general functions
파일 보기 프로젝트 열기: bricel/DrutNet 1 사용 예제들

공개 메소드들

메소드 설명
CreateDir ( string dir ) : DirectoryInfo
CurlDataProgress ( ProgressDataStruct info ) : void
DeleteAllFiles ( string directory, string fileNotToDelete ) : void
DirectoryExists ( string dir ) : bool
DownloadHTTPFile ( string httpPath, string savePath ) : bool

Download a public file from a URL

FileExists ( string file ) : bool
GetExtension ( string FileName ) : string

return file extension with leading point

GetFileName ( string FileName ) : string

Return file name and extension without path

GetFileNameWithoutExtension ( string FileName ) : string

Remove the extension and path of a filename

GetFileNameWithoutExtension ( string FileName, bool withPath ) : string

remove extension and keep path if withPath is set to true

GetPath ( string FileName ) : string

Return the path of the file

GetUniqueDirectory ( string dir, bool useUnderScore ) : string

return a unique dir name

GetUniqueFileName ( string sourceFN ) : string

check if filename exist , and return a filename_num that is unique

GetUniqueFileName ( string sourceFN, bool useUnderScore ) : string
OpenWebPage ( string url ) : void
ReadAutoCompleteFile ( string path ) : string[]
ReplaceFileExtension ( string FileName, string newExtension ) : string

replace the filename extension

UnZip ( string pathToUnZip, string targetFolder ) : void
WriteAutoCompleteFile ( string autoCompleteStr, string path ) : void
sendLogEvent ( string message, string mSender, Enums mType ) : void

Send a message event

sendLogEvent ( string message, string mSender, Enums mType, bool verbose ) : void
sendLogEvent ( string message, string errorFile, string mSender, Enums mType ) : void
sendLogEvent ( string message, string errorFile, string mSender, Enums mType, bool verbose ) : void

보호된 메소드들

메소드 설명
readByte ( BinaryReader ruleFileBinaryReader ) : byte
readFloat ( BinaryReader ruleFileBinaryReader, int numOfIFloatToRead ) : List

Read floats into an array

readFloat ( BinaryReader ruleFileBinaryReader ) : float

read single float

readInt32 ( BinaryReader ruleFileBinaryReader, int numOfIntToRead ) : List

read int32

readInt32 ( BinaryReader ruleFileBinaryReader ) : int

read single int 32

readString ( BinaryReader ruleFileBinaryReader, int numOfCharToRead ) : string
writeFloatToFile ( BinaryWriter ruleFileBinaryWriter, float f ) : bool
writeInt32ToFile ( BinaryWriter ruleFileBinaryWriter, int i ) : bool
writeStringAndLengthToFile ( BinaryWriter ruleFileBinaryWriter, string s ) : bool
writeStringToFile ( BinaryWriter ruleFileBinaryWriter, string s ) : bool
writeStringToFile ( BinaryWriter ruleFileBinaryWriter, string s, bool endChar ) : bool

비공개 메소드들

메소드 설명
sendErrorLogEvent ( string message ) : void
sendErrorLogEvent ( string message, bool verbose ) : void
writeLogToFile ( string message, string mSender, Enums mType ) : void

메소드 상세

CreateDir() 공개 정적인 메소드

public static CreateDir ( string dir ) : DirectoryInfo
dir string
리턴 System.IO.DirectoryInfo

CurlDataProgress() 공개 정적인 메소드

public static CurlDataProgress ( ProgressDataStruct info ) : void
info ProgressDataStruct
리턴 void

DeleteAllFiles() 공개 정적인 메소드

public static DeleteAllFiles ( string directory, string fileNotToDelete ) : void
directory string
fileNotToDelete string
리턴 void

DirectoryExists() 공개 정적인 메소드

public static DirectoryExists ( string dir ) : bool
dir string
리턴 bool

DownloadHTTPFile() 공개 정적인 메소드

Download a public file from a URL
public static DownloadHTTPFile ( string httpPath, string savePath ) : bool
httpPath string
savePath string
리턴 bool

FileExists() 공개 정적인 메소드

public static FileExists ( string file ) : bool
file string
리턴 bool

GetExtension() 공개 정적인 메소드

return file extension with leading point
public static GetExtension ( string FileName ) : string
FileName string
리턴 string

GetFileName() 공개 정적인 메소드

Return file name and extension without path
public static GetFileName ( string FileName ) : string
FileName string
리턴 string

GetFileNameWithoutExtension() 공개 정적인 메소드

Remove the extension and path of a filename
public static GetFileNameWithoutExtension ( string FileName ) : string
FileName string
리턴 string

GetFileNameWithoutExtension() 공개 정적인 메소드

remove extension and keep path if withPath is set to true
public static GetFileNameWithoutExtension ( string FileName, bool withPath ) : string
FileName string
withPath bool
리턴 string

GetPath() 공개 정적인 메소드

Return the path of the file
public static GetPath ( string FileName ) : string
FileName string
리턴 string

GetUniqueDirectory() 공개 정적인 메소드

return a unique dir name
public static GetUniqueDirectory ( string dir, bool useUnderScore ) : string
dir string Directory without ending slash
useUnderScore bool
리턴 string

GetUniqueFileName() 공개 정적인 메소드

check if filename exist , and return a filename_num that is unique
public static GetUniqueFileName ( string sourceFN ) : string
sourceFN string
리턴 string

GetUniqueFileName() 공개 정적인 메소드

public static GetUniqueFileName ( string sourceFN, bool useUnderScore ) : string
sourceFN string
useUnderScore bool
리턴 string

OpenWebPage() 공개 정적인 메소드

public static OpenWebPage ( string url ) : void
url string
리턴 void

ReadAutoCompleteFile() 공개 정적인 메소드

public static ReadAutoCompleteFile ( string path ) : string[]
path string
리턴 string[]

ReplaceFileExtension() 공개 정적인 메소드

replace the filename extension
public static ReplaceFileExtension ( string FileName, string newExtension ) : string
FileName string original file name to change
newExtension string new extension , with the dot
리턴 string

UnZip() 공개 정적인 메소드

public static UnZip ( string pathToUnZip, string targetFolder ) : void
pathToUnZip string
targetFolder string
리턴 void

WriteAutoCompleteFile() 공개 정적인 메소드

public static WriteAutoCompleteFile ( string autoCompleteStr, string path ) : void
autoCompleteStr string
path string
리턴 void

readByte() 보호된 메소드

protected readByte ( BinaryReader ruleFileBinaryReader ) : byte
ruleFileBinaryReader System.IO.BinaryReader
리턴 byte

readFloat() 보호된 메소드

Read floats into an array
protected readFloat ( BinaryReader ruleFileBinaryReader, int numOfIFloatToRead ) : List
ruleFileBinaryReader System.IO.BinaryReader
numOfIFloatToRead int
리턴 List

readFloat() 보호된 메소드

read single float
protected readFloat ( BinaryReader ruleFileBinaryReader ) : float
ruleFileBinaryReader System.IO.BinaryReader
리턴 float

readInt32() 보호된 메소드

read int32
protected readInt32 ( BinaryReader ruleFileBinaryReader, int numOfIntToRead ) : List
ruleFileBinaryReader System.IO.BinaryReader
numOfIntToRead int
리턴 List

readInt32() 보호된 메소드

read single int 32
protected readInt32 ( BinaryReader ruleFileBinaryReader ) : int
ruleFileBinaryReader System.IO.BinaryReader
리턴 int

readString() 보호된 메소드

protected readString ( BinaryReader ruleFileBinaryReader, int numOfCharToRead ) : string
ruleFileBinaryReader System.IO.BinaryReader
numOfCharToRead int
리턴 string

sendLogEvent() 공개 정적인 메소드

Send a message event
public static sendLogEvent ( string message, string mSender, Enums mType ) : void
message string
mSender string
mType Enums
리턴 void

sendLogEvent() 공개 정적인 메소드

public static sendLogEvent ( string message, string mSender, Enums mType, bool verbose ) : void
message string
mSender string
mType Enums
verbose bool
리턴 void

sendLogEvent() 공개 정적인 메소드

public static sendLogEvent ( string message, string errorFile, string mSender, Enums mType ) : void
message string
errorFile string
mSender string
mType Enums
리턴 void

sendLogEvent() 공개 정적인 메소드

public static sendLogEvent ( string message, string errorFile, string mSender, Enums mType, bool verbose ) : void
message string
errorFile string
mSender string
mType Enums
verbose bool
리턴 void

writeFloatToFile() 보호된 메소드

protected writeFloatToFile ( BinaryWriter ruleFileBinaryWriter, float f ) : bool
ruleFileBinaryWriter System.IO.BinaryWriter
f float
리턴 bool

writeInt32ToFile() 보호된 메소드

protected writeInt32ToFile ( BinaryWriter ruleFileBinaryWriter, int i ) : bool
ruleFileBinaryWriter System.IO.BinaryWriter
i int
리턴 bool

writeStringAndLengthToFile() 보호된 메소드

protected writeStringAndLengthToFile ( BinaryWriter ruleFileBinaryWriter, string s ) : bool
ruleFileBinaryWriter System.IO.BinaryWriter
s string
리턴 bool

writeStringToFile() 보호된 메소드

protected writeStringToFile ( BinaryWriter ruleFileBinaryWriter, string s ) : bool
ruleFileBinaryWriter System.IO.BinaryWriter
s string
리턴 bool

writeStringToFile() 보호된 메소드

protected writeStringToFile ( BinaryWriter ruleFileBinaryWriter, string s, bool endChar ) : bool
ruleFileBinaryWriter System.IO.BinaryWriter
s string
endChar bool
리턴 bool