microsoft/vscode-react-native

Public

mirrored from https://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
6a465861663d7c6f9433e89c6f6619df320dcef3

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/extension/appcenter/auth/profile/getProfileDir.ts

21lines · modecode

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT license. See LICENSE file in the project root for details.
3
4import * as os from "os";
5import * as path from "path";
6
7export const profileDirName = ".vscode-react-native";
8export const profileFile = "VSCodeAppCenterProfile.json";
9
10export function getProfileDir(): string {
11 const profileDir = path.join(getProfileDirParent(), profileDirName);
12 return profileDir;
13}
14
15export function getProfileDirParent(): string {
16 if (os.platform() === "win32") {
17 return process.env.AppData;
18 } else {
19 return os.homedir();
20 }
21}
22