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();
This page took 0.034995 seconds and 6 git commands to generate.