title: Sharepoint CSOM - how to filter out system/default document libraries?
body: <p>I need to get all documents from Sharepoint site. I start with getting all the document libraries:</p>
  
  <pre><code>private IEnumerable&lt;List&gt; GetAllDocumentLibraries(ClientContext context)
  {
      var lists = context.LoadQuery(context.Web.Lists.Where(list =&gt; list.BaseType == BaseType.DocumentLibrary));
      context.ExecuteQuery();
      return lists;
  }
  </code></pre>
  
  <p>And then get all the items from each..</p>
  
  <pre><code>var items = list.GetItems(CamlQuery.CreateAllItemsQuery());
  
  _context.Load(items, i =&gt; i.Include(it =&gt; it.DisplayName, it =&gt; it.File));
  
  _context.ExecuteQuery();
  </code></pre>
  
  <p>Problem is that there is a lot of system libraries that return files such as "controls", "edit-mode-21" and similar. I don't want to filter them out by specific names, since there could be other on another SP sites. </p>
  
  <p>How can I know from the <code>List</code> and its properties if it is user-created list (meaning with documents that I need) or just a sys. library?</p>
  
  <p>Thanks</p>