C# Class FileUtil, UnityFramework

Afficher le fichier Open project: meta-42/uEasyKit Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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

CreateFile() public static méthode

创建文件
public static CreateFile ( string pathName ) : StreamWriter,
pathName string
Résultat StreamWriter,

CreateFolder() public static méthode

创建文件夹
public static CreateFolder ( string pathName ) : DirectoryInfo,
pathName string
Résultat DirectoryInfo,

DeleteFile() public static méthode

删除文件
public static DeleteFile ( string pathName ) : bool
pathName string
Résultat bool

GetAllFileSize() public static méthode

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

GetFileSize() public static méthode

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

ReadFile() public static méthode

public static ReadFile ( string pathName ) : string
pathName string
Résultat string

ReadFile() public static méthode

读文件
public static ReadFile ( string pathName, string filenme ) : string
pathName string
filenme string
Résultat string

ReadFileWithByte() public static méthode

public static ReadFileWithByte ( string pathName ) : byte[]
pathName string
Résultat byte[]

WriteFileFromEnd() public static méthode

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

WriteFileLineFromEnd() public static méthode

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