C# 클래스 WinRTXamlToolkit.IO.Extensions.StorageItemExtensions

Extension methods for IStorageItem (StorageFile and others).
파일 보기 프로젝트 열기: xyzzer/WinRTXamlToolkit

공개 메소드들

메소드 설명
GetFreeSpaceAsync ( this sf ) : Task

Returns the free space of the storage associate with the given storage item.

GetSizeAsync ( this file ) : Task

Gets the file size in bytes.

GetSizeString ( this sizeInB ) : string

Gets the file size string given size in bytes.

GetSizeString ( this sizeInB, double promoteLimit = 1024, double decimalLimit = 10, string separator = " " ) : string

Gets the file size string given size in bytes.

메소드 상세

GetFreeSpaceAsync() 공개 정적인 메소드

Returns the free space of the storage associate with the given storage item.
public static GetFreeSpaceAsync ( this sf ) : Task
sf this Storage item
리턴 Task

GetSizeAsync() 공개 정적인 메소드

Gets the file size in bytes.
public static GetSizeAsync ( this file ) : Task
file this The file.
리턴 Task

GetSizeString() 공개 정적인 메소드

Gets the file size string given size in bytes.
public static GetSizeString ( this sizeInB ) : string
sizeInB this The size in B.
리턴 string

GetSizeString() 공개 정적인 메소드

Gets the file size string given size in bytes.
public static GetSizeString ( this sizeInB, double promoteLimit = 1024, double decimalLimit = 10, string separator = " " ) : string
sizeInB this The size in B.
promoteLimit double Specifies the number of units at which to promote to the next unit. Default is 1024. E.g. if the value is 1024 - for sizeInB of 1023 the result is 1023B, while for 1024 - 1kB.
decimalLimit double Defines the minimum number of units for which to produce results without decimal places. For lower values - results will include decimal places. Default is 10 which yields 9.8kB or 9.9kB, but yields "10kB" for both 10240B and 11263B.
separator string Separator between the value and the unit. Space by default. Typically should be either space or empty string.
리턴 string