async function getAllFilesInDirectoryAndSubdirectories(dir) {
                    const {promisify} = SA.nodeModules.util
                    const {resolve} = SA.nodeModules.path;
                    const fs = SA.nodeModules.fs;
                    const readdir = promisify(fs.readdir);
                    const stat = promisify(fs.stat);

                    return await new Promise(res => getFiles(dir)
                        .then(files => {
                            const splittedDir = dir.split('/')
                            const lastFolder = splittedDir[splittedDir.length - 2]
                            const pathAndNames = []
                            for(let i = 0; i < files.length; i++) {
                                const file = files[i]
                                let pathName = file.substring(file.indexOf(lastFolder) + lastFolder.length, file.length)
                                pathName = pathName.substring(1, pathName.length)
                                pathAndNames.push(pathName)
                            }
                            res(pathAndNames)
                        })
                        .catch(e => {
                            res([])
                        }))

                    async function getFiles(dir) {
                        const subdirs = await readdir(dir);
                        const files = await Promise.all(subdirs.map(async (subdir) => {
                            const res = resolve(dir, subdir);
                            return (await stat(res)).isDirectory() ? getFiles(res) : res;
                        }));
                        return files.reduce((a, f) => a.concat(f), []);
                    }
                }
@param {string} dir 
@returns {Promise<string[]>}