/// <summary> /// Restituisce la dimensione di File o di una Cartella /// </summary> public static async Task<string> GetItemSize(IStorageItem item) { if(item.IsOfType(StorageItemTypes.File)) { BasicProperties bp = await item.GetBasicPropertiesAsync(); ulong peso = bp.Size; return SizeConvert(peso); } else if(item.IsOfType(StorageItemTypes.Folder)) { StorageHelper total =new StorageHelper(); await total.FilesNumber((StorageFolder)item); return SizeConvert(total.GetFilesSize()); } else { return SizeConvert(0); } }
/// <summary> /// Restituisce il numero di file in una cartella /// </summary> public static async Task<int> GetFilesNumber(StorageFolder cartella) { StorageHelper total =new StorageHelper(); await total.FilesNumber(cartella); return total.GetFilesCount(); }