function dbDocumentToFileAdapter(dbDocument) {
  if (dbDocument.isDirectory) {
    return new Directory(FsFile.getPathFromPathElements(dbDocument.pathElements))
  }
  let blob = null
  let type = null
  if (dbDocument._attachments && dbDocument._attachments.self) {
    if (!dbDocument._attachments.self.stub) {
      blob = dbDocument._attachments.self.data
      type = dbDocument._attachments.self.content_type
    }
  }
  return new FsFile(FsFile.getPathFromPathElements(dbDocument.pathElements), dbDocument.label, blob, type, dbDocument.lastModified)
}
/**
 * Adapter function that generated a valid File class from a DbDocument class
 * @private
 * @param {DbDocument} dbDocument
 */
Adapter function that generated a valid File class from a DbDocument class
@private
@param {DbDocument} dbDocument
Adapter function that generated a valid File class from a DbDocument class @private @param { DbDocument } dbDocument
function dbDocumentToFileAdapter(dbDocument) {
  if (dbDocument.isDirectory) {
    return new Directory(FsFile.getPathFromPathElements(dbDocument.pathElements))
  }
  let blob = null
  let type = null
  if (dbDocument._attachments && dbDocument._attachments.self) {
    if (!dbDocument._attachments.self.stub) {
      blob = dbDocument._attachments.self.data
      type = dbDocument._attachments.self.content_type
    }
  }
  return new FsFile(FsFile.getPathFromPathElements(dbDocument.pathElements), dbDocument.label, blob, type, dbDocument.lastModified)
}
function dbDocumentToFileAdapter ( dbDocument ) { if ( dbDocument . isDirectory ) { return new Directory ( FsFile . getPathFromPathElements ( dbDocument . pathElements ) ) } let blob = null let type = null if ( dbDocument . _attachments && dbDocument . _attachments . self ) { if ( ! dbDocument . _attachments . self . stub ) { blob = dbDocument . _attachments . self . data type = dbDocument . _attachments . self . content_type } } return new FsFile ( FsFile . getPathFromPathElements ( dbDocument . pathElements ) , dbDocument . label , blob , type , dbDocument . lastModified ) }
Adapter function that generated a valid File class from a DbDocument class
 @private
 @param {DbDocument} dbDocument
Adapter function that generated a valid File class from a DbDocument class @private @param { DbDocument } dbDocument