static GET_DISK_SPACE_INFO(pathOnDisk) {
        try {
            //Inspired by https://github.com/Alex-D/check-disk-space
            const dfResult = spawnSync("df", ["-Pk", "--", pathOnDisk]);
            const dfOutput = dfResult.stdout.toString().trim().split("\n").slice(1).map(l => {
                return l.trim().split(/\s+(?=[\d/])/);
            });

            if (dfOutput.length !== 1 || dfOutput[0].length !== 6) {
                return null;
            }

            return {
                total: parseInt(dfOutput[0][1], 10) * 1024,
                free: parseInt(dfOutput[0][3], 10) * 1024,
            };
        } catch (e) {
            return null;
        }
    }
Returns the total and free size in bytes

@param {string} pathOnDisk
@returns {{total: number, free: number} | null}