{"size": 679, "ext": "js", "max_stars_repo_path": "sender/files.js", "max_stars_repo_name": "ctgroupgit/les", "max_stars_repo_stars_event_min_datetime": "2019-08-06T09:47:22.000Z", "max_stars_repo_stars_event_max_datetime": "2019-08-06T09:47:22.000Z", "max_issues_repo_path": "sender/files.js", "max_issues_repo_name": "ctgroupgit/les", "max_issues_repo_issues_event_min_datetime": "2020-04-06T12:33:48.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-25T18:57:40.000Z", "max_forks_repo_path": "sender/files.js", "max_forks_repo_name": "ctgroupgit/les", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 12, "max_forks_count": null, "avg_line_length": 24.25, "max_line_length": 85, "alphanum_fraction": 0.5081001473}
const fs = require('fs');
const path = require('path');
const containerFolder = 'contenitore';

module.exports = {
    getCurrentDirectoryBase: () => {
        return path.resolve(process.cwd());
    },

    directoryExists: (filePath) => {
        return fs.existsSync(filePath);
    },

    listFile: () => {
        let ar = [];
        fs.readdirSync(containerFolder).forEach((name) => {
            if (name.split('.').pop() === 'txt' || name.split('.').pop() === 'csv') {
                ar.push(name);
            }
        });
        return ar;
    },

    getContainerFolder() {
        return path.resolve(process.cwd()) + '/' + containerFolder.trim() + '/';
    }
};
