feat(daemon): add getZcashFolder helper

This commit is contained in:
George Lima 2019-05-30 15:47:03 -03:00
parent ae94230a65
commit 240805c9b7
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
// @flow
import os from 'os';
import path from 'path';
import electron from 'electron'; // eslint-disable-line
export const getZcashFolder = () => {
const { app } = electron;
if (os.platform() === 'darwin') {
return path.join(app.getPath('appData'), 'Zcash');
}
if (os.platform() === 'linux') {
return path.join(app.getPath('home'), '.zcash');
}
return path.join(app.getPath('appData'), 'Zcash');
};