async listAllFiles(options = { onlyPaths: false }) {
    const allDocs = await this.db.query('path', { include_docs: true, attachments: !options.onlyPaths, binary: !options.onlyPaths })
      .catch(err => {
        throw unknowError(err)
      })
    if (options.onlyPaths) {
      return allDocs.rows.map(row => dbDocumentToFileAdapter(row.doc).path)
    } else {
      return allDocs.rows.map(row => dbDocumentToFileAdapter(row.doc))
    }
  }
/**
   * Return all the files stored
   * @param {object} options
   * @param {object} [options.onlyPaths] - Only retrives the paths
   * @return {array} A sorted array of File or a sorted array of strings with the paths if onlyPaths is true
   */
Return all the files stored
@param {object} options
@param {object} [options.onlyPaths] - Only retrives the paths
@return {array} A sorted array of File or a sorted array of strings with the paths if onlyPaths is true
Return all the files stored @param { object } options @param { object } [ options . onlyPaths ] - Only retrives the paths @return { array } A sorted array of File or a sorted array of strings with the paths if onlyPaths is true
async listAllFiles(options = { onlyPaths: false }) {
    const allDocs = await this.db.query('path', { include_docs: true, attachments: !options.onlyPaths, binary: !options.onlyPaths })
      .catch(err => {
        throw unknowError(err)
      })
    if (options.onlyPaths) {
      return allDocs.rows.map(row => dbDocumentToFileAdapter(row.doc).path)
    } else {
      return allDocs.rows.map(row => dbDocumentToFileAdapter(row.doc))
    }
  }
async listAllFiles ( options = { onlyPaths : false } ) { const allDocs = await this . db . query ( 'path' , { include_docs : true , attachments : ! options . onlyPaths , binary : ! options . onlyPaths } ) . catch ( err => { throw unknowError ( err ) } ) if ( options . onlyPaths ) { return allDocs . rows . map ( row => dbDocumentToFileAdapter ( row . doc ) . path ) } else { return allDocs . rows . map ( row => dbDocumentToFileAdapter ( row . doc ) ) } }
Return all the files stored
 @param {object} options
 @param {object} [options.onlyPaths] - Only retrives the paths
 @return {array} A sorted array of File or a sorted array of strings with the paths if onlyPaths is true
Return all the files stored @param { object } options @param { object } [ options . onlyPaths ] - Only retrives the paths @return { array } A sorted array of File or a sorted array of strings with the paths if onlyPaths is true