Trying to make an app that gets and lists all the metadata from Dropbox account.
I am successfully able to get to the parent folder and print that info but cannot figure out how to get the API to go into the folder and then list the files and/or go into the next nested folder and list get those files. I imagine there is some method but I've been prowling the documentation for a day or two now and can't figure it out!
async Task GetFileList(string folderPath)
{
string apiToken = "dummy info";
using (var dbx = new DropboxClient(apiToken))
{
var listOfFolders = await dbx.Files.ListFolderAsync(string.Empty);
var currentFilePath = "";
DropboxFile dropboxFile = new DropboxFile();
foreach (var item in listOfFolders.Entries)
{
if (item.IsFolder)
{
Console.WriteLine("D {0}/", item.Name);
item = currentFilePath;
foreach (var metadata in listOfFolders.Entries.Where(i => i.IsFile))
{
string line = item.PathLower + "/" + item.Name + " " + item.AsFile.Size + item.AsFile.PropertyGroups;
Console.WriteLine(line);
}
else
{
Console.WriteLine("THESE ARE FILES NOW");
}
}
}
}
}
Be kind, I'm very new to c#
Thank you!