public long FileSize(string filePath)
{
long temp = 0;
//判断当前路径所指向的是否为文件
if (File.Exists(filePath))
{
FileInfo fileInfo = new FileInfo(filePath);
temp=fileInfo.Length;
}
temp = temp / (1024 * 1204);
return temp;
}
{
long temp = 0;
//判断当前路径所指向的是否为文件
if (File.Exists(filePath))
{
FileInfo fileInfo = new FileInfo(filePath);
temp=fileInfo.Length;
}
temp = temp / (1024 * 1204);
return temp;
}