public void PrintFile(StorageFile file) { if (file != null) { count++; Debug.WriteLine(this.getCount() + PtcEncoder.Decode(file.Name) + "(" + file.Path + ")"); count--; } }
public async Task PrintFolderAsync(StorageFolder folder) { if (folder != null) { count++; Debug.WriteLine(this.getCount() + "folder : " + PtcEncoder.Decode(folder.Name) + "(" + folder.Path + ")"); IReadOnlyList <StorageFile> fileList = await folder.GetFilesAsync(); IReadOnlyList <StorageFolder> folderList = await folder.GetFoldersAsync(); foreach (StorageFile file in fileList) { PrintFile(file); } foreach (StorageFolder _folder in folderList) { await PrintFolderAsync(_folder); } count--; } }