1 /**********************************************************************
2 * Copyright (c) 2015 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12 package org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
;
16 import org
.eclipse
.core
.runtime
.IPath
;
19 * Class to manage LTTng profiles files in workspace.
21 * @author Bernd Hufmann
23 public class LttngProfileManager
{
25 private static final String FOLDER
= "sessions"; //$NON-NLS-1$
27 private static final IPath SAVED_PROFILE_PATH
=
28 Activator
.getDefault().getStateLocation().append(FOLDER
);
31 File dir
= SAVED_PROFILE_PATH
.toFile();
32 /* Check if directory exists, otherwise create it */
33 if (!dir
.exists() || !dir
.isDirectory()) {
39 * Returns all LTTng profile files available in workspace.
41 * @return array with LTTng profiles
43 public static File
[] getProfiles() {
44 return SAVED_PROFILE_PATH
.toFile().listFiles();
48 * Gets the path where the profiles are located in the workspace.
50 * @return the profile path
52 public static IPath
getProfilePath() {
53 return SAVED_PROFILE_PATH
;
This page took 0.032413 seconds and 5 git commands to generate.