async function verifyFatherDirectoryExists(db, pathElements, throwError) {
  if (pathElements.length > 1) {
    const fatherDirectory = getFatherDirectory(pathElements)
    const fatherDirectoryDocument = await searchDocumentsByPath(db, fatherDirectory)
    if (fatherDirectoryDocument.length === 0) {
      if (throwError) {
        throw new InvalidPathError(`Father directory ${FsFile.getPathFromPathElements(fatherDirectory)} not exists.`)
      }
      return false
    }
  }
  return true
}
/**
 * Verify if the father directory exists
 * @private
 * @param db {PouchDb} database
 * @param pathElements {array} pathElements
 * @return {boolean} True if the fatherDirectory exists
 */
Verify if the father directory exists
@private
@param db {PouchDb} database
@param pathElements {array} pathElements
@return {boolean} True if the fatherDirectory exists
Verify if the father directory exists @private @param db { PouchDb } database @param pathElements { array } pathElements @return { boolean } True if the fatherDirectory exists
async function verifyFatherDirectoryExists(db, pathElements, throwError) {
  if (pathElements.length > 1) {
    const fatherDirectory = getFatherDirectory(pathElements)
    const fatherDirectoryDocument = await searchDocumentsByPath(db, fatherDirectory)
    if (fatherDirectoryDocument.length === 0) {
      if (throwError) {
        throw new InvalidPathError(`Father directory ${FsFile.getPathFromPathElements(fatherDirectory)} not exists.`)
      }
      return false
    }
  }
  return true
}
async function verifyFatherDirectoryExists ( db , pathElements , throwError ) { if ( pathElements . length > 1 ) { const fatherDirectory = getFatherDirectory ( pathElements ) const fatherDirectoryDocument = await searchDocumentsByPath ( db , fatherDirectory ) if ( fatherDirectoryDocument . length === 0 ) { if ( throwError ) { throw new InvalidPathError ( ` ${ FsFile . getPathFromPathElements ( fatherDirectory ) } ` ) } return false } } return true }
Verify if the father directory exists
 @private
 @param db {PouchDb} database
 @param pathElements {array} pathElements
 @return {boolean} True if the fatherDirectory exists
Verify if the father directory exists @private @param db { PouchDb } database @param pathElements { array } pathElements @return { boolean } True if the fatherDirectory exists