Question: I am trying to do a mysqldump from a local Linux machine to a Windows folder that has been mounted on the system. This is the command I am using in the terminal:

```
mysqldump -u root -plinuxsux myDB -t LOG > /mounted folder/path/blah/myDB.sql

```

I am getting the following error:

```
/mounted folder/path/blah/myDB.sql: Permission denied

```

I checked the permissions of the folder on the Windows side, and there is a specific user that I created called Sys003 that has full control of that folder.

Do I need to put that user name (and password) into the command above to get it to work? And if so, how do I do that? Thanks.

Answer: 
Yes, it's correct, to deal with the asynchronous way in a server-side environment. But if their use case is different like to generating the build as in client-side JS project, meanwhile reading and writing the JSON files for different flavors.

It doesn't affect that much. Although we needed a rapid manner to create a minified build for deployment (here synchronous comes into the picture).
[for more info and library](https://www.npmjs.com/package/fs-extra)
After a lot of time and a lot of learn & practice I've tried once more and I've found the answer and I can show some example:

```
const fs = require('fs');

const syncTest = () => {
    let startTime = +new Date();
    const results = [];
    const files = [];

    for (let i=0, len=4; i<len; i++) {
        files.push(fs.readFileSync(`file-${i}.txt`));
    };

    for (let i=0, len=360; i<len; i++) results.push(Math.sin(i), Math.cos(i));
    console.log(`Sync version: ${+new Date() - startTime}`);
};

const asyncTest = () => {
    let startTime = +new Date();
    const results = [];
    const files = [];

    for (let i=0, len=4; i<len; i++) {
        fs.readFile(`file-${i}.txt`, file => files.push(file));
    };

    for (let i=0, len=360; i<len; i++) results.push(Math.sin(i), Math.cos(i));

    console.log(`Async version: ${+new Date() - startTime}`);
};

syncTest();
asyncTest();

```