C# – Identify “Forms” folder in a Sharepoint document library

asp.netcsharepoint

I'm working on an application that shows a listing of files and folders within a Sharepoint document library. The file/folder list is created based on the SPList's RootFolder.SubFolders and .Files collections.

Is there a way to filter out the "Forms" folder from the results, without hard-coding a check for a folder called forms?

Best Answer

You could check if the folder does not have an associated list item, i.e. if SPFolder.Item is null. Otherwise, hard-coding the name "Forms" should be ok as this does not change across different language versions of SharePoint.