Show / Hide Table of Contents

Class DiskInfo

Provides support for monitoring disk usage information.

Inheritance
System.Object
DiskInfo
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CrashCABN.Shared
Assembly: CrashCABN.Shared.DiskInfo.dll
Syntax
public static class DiskInfo

Properties

View Source

DiskSpaceUsageThreshold

Gets or sets the threshold of used disk space to not allow downloading new cabs.

Declaration
public static double DiskSpaceUsageThreshold { get; set; }
Property Value
Type Description
System.Double

Methods

View Source

FormatBytes(Int64)

Formats bytes into a string description.

Declaration
public static string FormatBytes(long bytes)
Parameters
Type Name Description
System.Int64 bytes

Bytes to format to string.

Returns
Type Description
System.String

Bytes formatted as a string, such as 150.0 GB.

View Source

GetDiskPercentUsed(String, Int64)

Returns a double representing percent of disk being used for the current user.

Declaration
public static double GetDiskPercentUsed(string path, long additionalUsedBytes = 0L)
Parameters
Type Name Description
System.String path

Path to report on.

System.Int64 additionalUsedBytes

Long representing a potential additional amount of bytes to be calculated as in use. (This is called when checking if there is enough free space to download a file).

Returns
Type Description
System.Double

A double representing percent of selected disk being used.

View Source

GetSpaceFreeLabel(String)

Returns a string describing amount of disk space available to the user for a given path.

Declaration
public static string GetSpaceFreeLabel(string path)
Parameters
Type Name Description
System.String path

Path to review.

Returns
Type Description
System.String

A string description, such as 150.0 GB, depicting the space free.

  • View Source
In This Article
Back to top Generated by DocFX