/// <summary>
 /// Get the list of file status objects specified by the file path.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataLake.StoreFileSystem.IFileSystemOperations.
 /// </param>
 /// <param name='filePath'>
 /// Required. The path to the file to retrieve status for.
 /// </param>
 /// <param name='accountName'>
 /// Required. The name of the account to use
 /// </param>
 /// <param name='parameters'>
 /// Optional. Query parameters. If null is passed returns all file
 /// status items.
 /// </param>
 /// <returns>
 /// Data Lake Store filesystem file status list information response.
 /// </returns>
 public static Task<FileStatusesResponse> ListFileStatusAsync(this IFileSystemOperations operations, string filePath, string accountName, DataLakeStoreFileSystemListParameters parameters)
 {
     return operations.ListFileStatusAsync(filePath, accountName, parameters, CancellationToken.None);
 }
 /// <summary>
 /// Get the list of file status objects specified by the file path.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataLake.StoreFileSystem.IFileSystemOperations.
 /// </param>
 /// <param name='filePath'>
 /// Required. The path to the file to retrieve status for.
 /// </param>
 /// <param name='accountName'>
 /// Required. The name of the account to use
 /// </param>
 /// <param name='parameters'>
 /// Optional. Query parameters. If null is passed returns all file
 /// status items.
 /// </param>
 /// <returns>
 /// Data Lake Store filesystem file status list information response.
 /// </returns>
 public static FileStatusesResponse ListFileStatus(this IFileSystemOperations operations, string filePath, string accountName, DataLakeStoreFileSystemListParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IFileSystemOperations)s).ListFileStatusAsync(filePath, accountName, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
        public FileStatuses GetFileStatuses(string folderPath, string accountName, int maxEntriesReturned = 100)
        {
            var parameters = new DataLakeStoreFileSystemListParameters
            {
                Top = maxEntriesReturned
            };

            return _client.FileSystem.ListFileStatus(folderPath, accountName, parameters).FileStatuses;
        }