C# Class Ywdsoft.Utility.FileHelper

文件相关助手类
Afficher le fichier Open project: CrazyJson/TaskManager

Méthodes publiques

Méthode Description
GetAbsolutePath ( string relativePath ) : string

获取文件的绝对路径,针对window程序和web程序都可使用

GetFileHash ( string filePath ) : string

计算文件的hash值 用于比较两个文件是否相同

GetRootPath ( ) : string

获取文件的绝对路径,针对window程序和web程序都可使用

isValidFileContent ( string filePath1, string filePath2 ) : bool

通过文件Hash 比较两个文件内容是否相同

Method Details

GetAbsolutePath() public static méthode

获取文件的绝对路径,针对window程序和web程序都可使用
public static GetAbsolutePath ( string relativePath ) : string
relativePath string 相对路径地址
Résultat string

GetFileHash() public static méthode

计算文件的hash值 用于比较两个文件是否相同
public static GetFileHash ( string filePath ) : string
filePath string 文件路径
Résultat string

GetRootPath() public static méthode

获取文件的绝对路径,针对window程序和web程序都可使用
public static GetRootPath ( ) : string
Résultat string

isValidFileContent() public static méthode

通过文件Hash 比较两个文件内容是否相同
public static isValidFileContent ( string filePath1, string filePath2 ) : bool
filePath1 string 文件1地址
filePath2 string 文件2地址
Résultat bool