C# Class FileUtil, UnityFramework

Mostrar archivo Open project: meta-42/uEasyKit Class Usage Examples

Public Methods

Method Description
CoverFile ( string pathName, string content ) : void

覆盖文件 [没有会创建]

CreateFile ( string pathName ) : StreamWriter,

创建文件

CreateFolder ( string pathName ) : DirectoryInfo,

创建文件夹

DeleteFile ( string pathName ) : bool

删除文件

GetAllFileSize ( string folderName ) : int

返回文件夹大小

GetFileSize ( string path, string fileName ) : int

返回文件大小

ReadFile ( string pathName ) : string
ReadFile ( string pathName, string filenme ) : string

读文件

ReadFileWithByte ( string pathName ) : byte[]
WriteFileFromEnd ( string pathName, string content ) : void

写文件 [没有会创建]

WriteFileLineFromEnd ( string pathName, string content ) : void

写文件 按行写入[没有会创建]

Method Details

CoverFile() public static method

覆盖文件 [没有会创建]
public static CoverFile ( string pathName, string content ) : void
pathName string
content string
return void

CreateFile() public static method

创建文件
public static CreateFile ( string pathName ) : StreamWriter,
pathName string
return StreamWriter,

CreateFolder() public static method

创建文件夹
public static CreateFolder ( string pathName ) : DirectoryInfo,
pathName string
return DirectoryInfo,

DeleteFile() public static method

删除文件
public static DeleteFile ( string pathName ) : bool
pathName string
return bool

GetAllFileSize() public static method

返回文件夹大小
public static GetAllFileSize ( string folderName ) : int
folderName string
return int

GetFileSize() public static method

返回文件大小
public static GetFileSize ( string path, string fileName ) : int
path string
fileName string
return int

ReadFile() public static method

public static ReadFile ( string pathName ) : string
pathName string
return string

ReadFile() public static method

读文件
public static ReadFile ( string pathName, string filenme ) : string
pathName string
filenme string
return string

ReadFileWithByte() public static method

public static ReadFileWithByte ( string pathName ) : byte[]
pathName string
return byte[]

WriteFileFromEnd() public static method

写文件 [没有会创建]
public static WriteFileFromEnd ( string pathName, string content ) : void
pathName string
content string
return void

WriteFileLineFromEnd() public static method

写文件 按行写入[没有会创建]
public static WriteFileLineFromEnd ( string pathName, string content ) : void
pathName string
content string
return void