Drive Api v3 not returning all files from the root folder
<p>I am using the following code to retrieve all the files from the root folder of my google drive.</p>

<pre><code>List&lt;File&gt; result = new ArrayList&lt;File&gt;();
            Files.List req = null;

            try {
                  req = driveService.files().list();
                  FileList files = req.setQ("'root' in parents and trashed=false").execute();
                  result.addAll(files.getFiles());          
                  req.setPageToken(files.getNextPageToken());
                } 
              catch (IOException e)
              {
                System.out.println("An error occurred: " + e);
                req.setPageToken(null);
              }

          //Print out all the files and folder of root Directory  
            for(File f:result)
            {
                System.out.println("recvd data are: "+f.getName());
            }
</code></pre>

<p>But the issue is that still not all files are being retrieved instead only 14 files are returning from the drive always. Can anybody please guide me where I am going wrong.</p>

<p>Thanks,</p>