C# Class FileSize, Clippy

ファイルを表示 Open project: 24hr/Clippy Class Usage Examples

Public Methods

Method Description
KibiFileSize ( this file, string numberFormat = "0.##", IFormatProvider format = null ) : string

Returns a formatted string representing the file size in a human readable format using 1024 as power. http://en.wikipedia.org/wiki/Kibibyte

KiloFileSize ( this file, string numberFormat = "0.##", IFormatProvider format = null ) : string

Returns a formatted string representing the file size in a human readable format using 1000 as power.

http://en.wikipedia.org/wiki/Kilobyte

ToKibiFileSize ( this length, string numberFormat = "0.##", IFormatProvider formatProvider = null ) : string

Returns a string formatted to represent a file size using multiplication of 1024 as power

http://en.wikipedia.org/wiki/Kibibyte

ToKiloFileSize ( this length, string numberFormat = "0.##", IFormatProvider formatProvider = null ) : string

Returns a string formatted to represent file size using multiplication of 1000 as power.

http://en.wikipedia.org/wiki/Kilobyte

Private Methods

Method Description
ValidateFileInfo ( FileInfo file ) : void

Method Details

KibiFileSize() public static method

Returns a formatted string representing the file size in a human readable format using 1024 as power. http://en.wikipedia.org/wiki/Kibibyte
public static KibiFileSize ( this file, string numberFormat = "0.##", IFormatProvider format = null ) : string
file this
numberFormat string
format IFormatProvider
return string

KiloFileSize() public static method

Returns a formatted string representing the file size in a human readable format using 1000 as power.
http://en.wikipedia.org/wiki/Kilobyte
public static KiloFileSize ( this file, string numberFormat = "0.##", IFormatProvider format = null ) : string
file this
numberFormat string
format IFormatProvider
return string

ToKibiFileSize() public static method

Returns a string formatted to represent a file size using multiplication of 1024 as power
http://en.wikipedia.org/wiki/Kibibyte
public static ToKibiFileSize ( this length, string numberFormat = "0.##", IFormatProvider formatProvider = null ) : string
length this
numberFormat string
formatProvider IFormatProvider
return string

ToKiloFileSize() public static method

Returns a string formatted to represent file size using multiplication of 1000 as power.
http://en.wikipedia.org/wiki/Kilobyte
public static ToKiloFileSize ( this length, string numberFormat = "0.##", IFormatProvider formatProvider = null ) : string
length this
numberFormat string
formatProvider IFormatProvider
return string