Hi @Puneeth, C ,
You can try following caml query to get files in library root folder.
List list = context.Web.Lists.GetByTitle("YOURLISTNAME");
context.Load(list.RootFolder);
context.Load(list.RootFolder.Files);
var items = list.GetItems(
new CamlQuery()
{
ViewXml = @"<View><ViewFields><FieldRef Name='Title' /><FieldRef Name='FileLeafRef' /><FieldRef Name='ID' /><FieldRef Name='ContentType' /></ViewFields><Query>
<Where><IsNotNull><FieldRef Name='File_x0020_Type' /></IsNotNull></Where>
</Query></View>"
});
context.Load(items, a => a.IncludeWithDefaultProperties(item => item.File, item => item.File.CheckedOutByUser));
context.ExecuteQuery();
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.