function ifFileExists() {
    return __awaiter(this, void 0, void 0, function* () {
        try {
            fs_1.default.readdirSync(searchDir).reverse().every((file) => __awaiter(this, void 0, void 0, function* () {
                if (imageExt.includes(file.substr(-4 || -5)) && logo.test(path_1.default.parse(file).name) === true) {
                    fileFound = path_1.default.join(searchDir + '/' + file);
                    progressStatus(false);
                    return false;
                }
                return true;
            }));
        }
        catch (err) {
            console.error(err);
        }
    });
}
/**
 * Description: Searches the logo directory for supported image files, if multiple images are in the directory,
 *  it will select the image by descending alphabetical order of its extension.
 */
Searches the logo directory for supported image files, if multiple images are in the directory,
it will select the image by descending alphabetical order of its extension.
Searches the logo directory for supported image files if multiple images are in the directory it will select the image by descending alphabetical order of its extension .
function ifFileExists() {
    return __awaiter(this, void 0, void 0, function* () {
        try {
            fs_1.default.readdirSync(searchDir).reverse().every((file) => __awaiter(this, void 0, void 0, function* () {
                if (imageExt.includes(file.substr(-4 || -5)) && logo.test(path_1.default.parse(file).name) === true) {
                    fileFound = path_1.default.join(searchDir + '/' + file);
                    progressStatus(false);
                    return false;
                }
                return true;
            }));
        }
        catch (err) {
            console.error(err);
        }
    });
}
function ifFileExists ( ) { return __awaiter ( this , void 0 , void 0 , function * ( ) { try { fs_1 . default . readdirSync ( searchDir ) . reverse ( ) . every ( ( file ) => __awaiter ( this , void 0 , void 0 , function * ( ) { if ( imageExt . includes ( file . substr ( - 4 || - 5 ) ) && logo . test ( path_1 . default . parse ( file ) . name ) === true ) { fileFound = path_1 . default . join ( searchDir + '/' + file ) ; progressStatus ( false ) ; return false ; } return true ; } ) ) ; } catch ( err ) { console . error ( err ) ; } } ) ; }
Description: Searches the logo directory for supported image files, if multiple images are in the directory,
  it will select the image by descending alphabetical order of its extension.
Description : Searches the logo directory for supported image files if multiple images are in the directory it will select the image by descending alphabetical order of its extension .