SPFileCollection foler = pdflibrary.RootFolder.Files;
Above code line will only give files outside folder. How can get all files inside and outside folder into
SPFileCollection. What is the easiest way.
Use the following code snippet:
var query = new SPQuery(); query.Folder = pdflibrary.RootFolder; query.ViewAttributes = "Scope=\"Recursive\""; var listItems = list.GetItems(query);