发布于 4年前
C# 计算总文件大小
public int CalculateTotalFileSize(string[] path)
{
int sumFileSize = 0;
foreach(string onePath in path)
{
FileInfo info = new FileInfo(onePath);
sumFileSize += Convert.ToInt32(info.Length);
}
return sumFileSize;
}