BLL.Service.DropboxService.FindFilesByPath C# (CSharp) Method

FindFilesByPath() public method

public FindFilesByPath ( string path ) : Task>
path string
return Task>
        public async Task<List<DropBoxFile>> FindFilesByPath(string path)
        {
            var files = new List<DropBoxFile>();
            // Get root folder with content
            var rootFolder = await _client.Core.Metadata.MetadataAsync(path != null ? string.Format("/{0}", path) : "/");

            if (rootFolder.contents != null)
            {
                files.AddRange(rootFolder.contents.Select(x => new DropBoxFile
                {
                    Name = x.Name,
                    Path = x.path,
                    Size = x.size,
                    Icon = x.icon.GetIconByMimeType(),
                    ModifiedDate = DateTime.Parse(x.modified)
                }));
                return files;
            }
            return files;
        }
    }