const fs = require('fs');
const path = require('path');
export function reactAllDirectory(path, callback) {
    fs.readdir(path, function (err, items) {
        if (err)
            throw new Error('Error');
        for (let i = 0; i < items.length; i++) {
            const item = items[i];
            if (fs.lstatSync(path + item).isDirectory()) {
                reactAllDirectory(path + item + '/', callback);
            }
            else {
                callback(item, path + item);
            }
        }
    });
}
export function renameFileToExtension(pathName, ext, callback) {
    let newPath = path.parse(pathName);
    let newPathFileName = newPath.dir + '/' + newPath.name + '.' + ext;
    fs.rename(pathName, newPathFileName, function (err, item) {
        if (callback)
            callback(err, item);
    });
}
reactAllDirectory('../components/Icon/assets/', (_, path) => {
    renameFileToExtension(path, 'tsx', function () {
    });
});
//# sourceMappingURL=files.js.map