Is there a way to programmatically to find if an item that has been added to a document library is a folder through a remote event receiver?

I want to remove all permissions when a folder is been added to the document library


Check the FileSystemObjectType property of the added item to determine if it is folder. To remove all permissions use ListItem.BreakRoleInheritance(false,false)

  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. – Waqas Sarwar MVP Dec 28 '14 at 15:33
  • 1
    This provides the answer to a part of the question where OP wants to check if item added is folder or not. – Nadeem Yousuf Dec 28 '14 at 15:35
  • 1
    @waqas, I added the answer for second part as well. Do me a favour and ad the code part in my answer in code block. I am on mobile so I don't have that option – Nadeem Yousuf Dec 28 '14 at 15:52
  • I m on mobile as well :( – Waqas Sarwar MVP Dec 28 '14 at 16:00
  • 2
    I've fixed it for you (I can write ` on my mobile)! – Robert Lindgren Dec 28 '14 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.