Files
flipper/desktop/flipper-server-core/src/utils/paths.tsx
Andrey Goncharov d987e36c62 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
2022-06-10 06:38:50 -07:00

19 lines
486 B
TypeScript

/**
* 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',
);