feat(daemon): add getZcashFolder helper
This commit is contained in:
parent
ae94230a65
commit
240805c9b7
|
@ -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');
|
||||
};
|
Loading…
Reference in New Issue