Add a single place to initialize Flipper utilitary folders
Summary: We have several folders Flipper uses that sometimes we forget to create before Flipper starts. With this diff we have a single place to initialise the necessary folder structure. Reviewed By: lblasa Differential Revision: D37036601 fbshipit-source-id: f945f2bfdfc6be24ba87bd4b13c7fcef3fd74451
This commit is contained in:
committed by
Facebook GitHub Bot
parent
60f9a5e8de
commit
d987e36c62
18
desktop/flipper-server-core/src/utils/paths.tsx
Normal file
18
desktop/flipper-server-core/src/utils/paths.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
import os from 'os';
|
||||
import xdg from 'xdg-basedir';
|
||||
|
||||
export const flipperDataFolder = path.resolve(os.homedir(), '.flipper');
|
||||
export const flipperSettingsFolder = path.resolve(
|
||||
...(xdg.config ? [xdg.config] : [os.homedir(), '.config']),
|
||||
'flipper',
|
||||
);
|
||||
Reference in New Issue
Block a user