Skip to content

Add an IsFolder method to FileOrFolderInformation class.#207

Merged
hpsin merged 2 commits into
microsoft:masterfrom
WilliamsJason:master
Jan 24, 2017
Merged

Add an IsFolder method to FileOrFolderInformation class.#207
hpsin merged 2 commits into
microsoft:masterfrom
WilliamsJason:master

Conversation

@WilliamsJason
Copy link
Copy Markdown
Contributor

No description provided.

@WilliamsJason
Copy link
Copy Markdown
Contributor Author

Fixes issue #205.

Copy link
Copy Markdown
Contributor

@hpsin hpsin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for delay, had to proof out that the flags would behave as expected. Turns out there's a slight difference


/// <summary>
/// Gets whether the current item is a folder
/// </summary>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be
return ((this.Type & 0x10) == 0x10) // check for 0x10 flag
As the type is a set of flags, defined here, where 0x10 is the flag for directory.  Other flags get added on that can change it (e.g. MyMusic is 9238)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah of course, thank you!

@hpsin
Copy link
Copy Markdown
Contributor

hpsin commented Jan 24, 2017

Thanks!

@hpsin hpsin merged commit 0e24f5d into microsoft:master Jan 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants