title: Google App Script File class method getOwner() Always returning null for Google shared Drive files
body: <p>I am trying to extract file details by using the below app script. It works for all the files saved in my drive or files shared with me by someone else. For shared drives files, <code>var owner = file.getOwner()</code> always returns <code>null</code>. Other than <code>getOwner()</code> all the methods works well even with a shared drive folder. Please suggest if I am doing something wrong here.</p>
  <p>Code:</p>
  <pre><code>function list_all_files_inside_one_folder_without_subfolders(){
    var sh = SpreadsheetApp.getActiveSheet();
    var folder = DriveApp.getFolderById('MyFolderID'); // I change the folder ID  here 
    var list = [];
    list.push(['Name','ID', 'URL','Size','Upload Date', 'Owner']);
    list_all_folders_of_folder(folder,list)
    
     sh.getRange(1,1,list.length,list[0].length).setValues(list);
  }
  
  function list_all_folders_of_folder(folder,list){
    var subfolder = folder.getFolders();
     while (subfolder.hasNext()) {
      folder = subfolder.next();
      list_all_files_of_folder(folder,list)
     }
  }
  
  function list_all_files_of_folder(folder,list){
    var  files = folder.getFiles()
    while (files.hasNext()){
        file = files.next();
        var row = []
        var owner = file.getOwner()
        Logger.log(file.getName())
        Logger.log(owner)
        row.push(file.getName(),file.getId(), file.getUrl(), file.getSize(), file.getLastUpdated(), owner.getName() )
        list.push(row);
     }
  }
  </code></pre>