BuildReportTool.Util.GetFolderSizeInBytes C# (CSharp) Méthode

GetFolderSizeInBytes() public static méthode

public static GetFolderSizeInBytes ( string folderPath ) : double
folderPath string
Résultat double
	public static double GetFolderSizeInBytes(string folderPath)
	{
		if (!Directory.Exists(folderPath))
		{
			return 0;
		}

		double totalBytesOfFilesInFolder = 0;
		foreach (string file in DldUtil.TraverseDirectory.Do(folderPath))
		{
			totalBytesOfFilesInFolder += GetFileSizeInBytes(file);
		}

		return totalBytesOfFilesInFolder;
	}