I'm playing with the Dropbox's Delta API, when I call delta method I get a list of path's that changed since last call.
/photos
/public
/photos/sample album
/photos/sample album/boston city flow.jpg
/photos/sample album/pensive parakeet.jpg
/photos/sample album/costa rican frog.jpg
/getting started.pdf
/photos/how to use the photos folder.txt
/public/how to use the public folder.txt
/ies eai.pptx
/documents
/documents/windows phone toolkit in depth 2nd edition.pdf
/prashant
/prashant/iphone indexed list.bmml
/photos/flower.jpg
/photos/trs
/photo.jpg
/hello1
/hello1/new
I had a hard time creating hierarchical (in below mentioned class) structure out of it by manipulating the string, could anyone suggest a way/idea I can achieve it.
public class DeltaItem
{
private List<DeltaItem> _items;
public string Path { get; set; }
public bool IsDir { get; set; }
public List<DeltaItem> Items
{
get
{
return _items ?? (_items = new List<DeltaItem>());
}
}
}