Reputation: 981
I am coding against the OneDrive C# SDK
and I am trying to see if the Microsoft.OneDrive.Sdk.Item
class has any property where it states if an item is a Folder or a File?
I took a look in the Item
class in the Microsoft.OneDrive.Sdk
namespace but nothing popped out to me.
Upvotes: 1
Views: 361
Reputation: 134
For the C# SDK, you can determine it by the item's property Folder
and File
Upvotes: 0
Reputation: 27964
It is distinguised by the following properties:
Folder
property non-nullFile
property non-nullSee the Item
class source and the underlying API's documentation stating:
Items have Facets that provide data about the
item
's identities and capabilities. Folders have afolder
facet and files have afile
facet. Images have animage
facet in addition to theirfile
facet.
Upvotes: 2