示例#1
0
        public static async Task <IEnumerable <IListFileItem> > ListFilesAndDirectoriesAsync(CloudFileDirectory directory, string prefix, int?maxResults, FileRequestOptions options, OperationContext operationContext)
        {
            List <IListFileItem>  results = new List <IListFileItem>();
            FileContinuationToken token   = null;

            do
            {
                FileResultSegment resultSegment = await directory.ListFilesAndDirectoriesSegmentedAsync(prefix, maxResults, token, options, operationContext);

                results.AddRange(resultSegment.Results);
                token = resultSegment.ContinuationToken;
            }while (token != null);
            return(results);
        }