C# Class Ywdsoft.Utility.FileHelper

文件相关助手类
Datei anzeigen Open project: CrazyJson/TaskManager

Public Methods

Method 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 method

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

GetFileHash() public static method

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

GetRootPath() public static method

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

isValidFileContent() public static method

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