C# Class PathLib.FileSize

Represents the size of a particular file.
Afficher le fichier Open project: nemec/pathlib

Méthodes publiques

Méthode Description
Equals ( object obj ) : bool
FileSize ( long bytes ) : System

Represents the size of a particular file.

GetHashCode ( ) : int
ToSIUnits ( ) : FileSize

Returns the file size represented in multiples of 1000.

ToString ( ) : string

Convert to a string using the closest "round" units.

ToString ( FileSizeUnits units, bool useUnambiguousPrefixes = false ) : string

Returns the string using the given units.

Private Methods

Méthode Description
FileSize ( long bytes, FileSizeScale scale ) : System

Represents the size of a particular file.

GetAs ( FileSizeUnits units ) : long
GetAsFraction ( FileSizeUnits units ) : double

Method Details

Equals() public méthode

public Equals ( object obj ) : bool
obj object
Résultat bool

FileSize() public méthode

Represents the size of a particular file.
public FileSize ( long bytes ) : System
bytes long
Résultat System

GetHashCode() public méthode

public GetHashCode ( ) : int
Résultat int

ToSIUnits() public méthode

Returns the file size represented in multiples of 1000.
public ToSIUnits ( ) : FileSize
Résultat FileSize

ToString() public méthode

Convert to a string using the closest "round" units.
public ToString ( ) : string
Résultat string

ToString() public méthode

Returns the string using the given units.
public ToString ( FileSizeUnits units, bool useUnambiguousPrefixes = false ) : string
units FileSizeUnits
useUnambiguousPrefixes bool /// Use the new IEC prefixes for binary units (kibibytes-KiB, /// mebibytes-MiB, etc.) instead of the more common units. ///
Résultat string