function correctMetadata(entryMetadata) {
  entryMetadata.index = parseInt(entryMetadata.index, 10);
  entryMetadata.size = parseInt(entryMetadata.size, 10);
  entryMetadata.modificationTime =
      DateFromTimeT(entryMetadata.modificationTime);
  if (entryMetadata.isDirectory) {
    console.assert(
        entryMetadata.entries,
        'The field "entries" is mandatory for dictionaries.');
    for (var entry in entryMetadata.entries) {
      correctMetadata(entryMetadata.entries[entry]);
    }
  }
}
/**
 * Corrects metadata entries fields in order for them to be sent to Files.app.
 * This function runs recursively for every entry in a directory.
 * @param {!Object<string, !EntryMetadata>} entryMetadata The metadata to
 *     correct.
 */
Corrects metadata entries fields in order for them to be sent to Files.app.
This function runs recursively for every entry in a directory.
@param {!Object} entryMetadata The metadata to
correct.
Corrects metadata entries fields in order for them to be sent to Files . app . This function runs recursively for every entry in a directory . @param { !Object } entryMetadata The metadata to correct .
function correctMetadata(entryMetadata) {
  entryMetadata.index = parseInt(entryMetadata.index, 10);
  entryMetadata.size = parseInt(entryMetadata.size, 10);
  entryMetadata.modificationTime =
      DateFromTimeT(entryMetadata.modificationTime);
  if (entryMetadata.isDirectory) {
    console.assert(
        entryMetadata.entries,
        'The field "entries" is mandatory for dictionaries.');
    for (var entry in entryMetadata.entries) {
      correctMetadata(entryMetadata.entries[entry]);
    }
  }
}
function correctMetadata ( entryMetadata ) { entryMetadata . index = parseInt ( entryMetadata . index , 10 ) ; entryMetadata . size = parseInt ( entryMetadata . size , 10 ) ; entryMetadata . modificationTime = DateFromTimeT ( entryMetadata . modificationTime ) ; if ( entryMetadata . isDirectory ) { console . assert ( entryMetadata . entries , 'The field "entries" is mandatory for dictionaries.' ) ; for ( var entry in entryMetadata . entries ) { correctMetadata ( entryMetadata . entries [ entry ] ) ; } } }
Corrects metadata entries fields in order for them to be sent to Files.app.
Corrects metadata entries fields in order for them to be sent to Files . app .