Commit | Line | Data |
---|---|---|
f17bb886 MAL |
1 | /******************************************************************************* |
2 | * Copyright (c) 2015 Ericsson | |
3 | * | |
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 | |
8 | * | |
9 | * Contributors: | |
10 | * Marc-Andre Laperle - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
13 | package org.eclipse.tracecompass.internal.tmf.ui.project.wizards.importtrace; | |
14 | ||
15 | /** | |
16 | * This interface abstracts the differences between different kinds of | |
17 | * FileSystemObjects such as File, TarEntry, ZipEntry, etc. This allows clients | |
18 | * (TraceFileSystemElement, TraceValidateAndImportOperation) to handle all the | |
19 | * types transparently. | |
20 | */ | |
21 | public interface IFileSystemObject { | |
22 | ||
23 | /** | |
24 | * Get the name of the file system object (last segment). | |
25 | * | |
26 | * @return the name of the file system object. | |
27 | */ | |
28 | String getName(); | |
29 | ||
30 | /** | |
31 | * Get the absolute path of the file system object. | |
32 | * | |
33 | * @return the absolute path of the file system object | |
34 | */ | |
35 | String getAbsolutePath(); | |
36 | ||
37 | /** | |
38 | * Get the source location for this file system object. | |
39 | * | |
40 | * @return the source location | |
41 | */ | |
42 | String getSourceLocation(); | |
43 | ||
44 | /** | |
45 | * Returns the raw object wrapped by this IFileSystemObject (File, TarEntry, etc). | |
46 | * | |
47 | * @return the raw object wrapped by this IFileSystemObject | |
48 | */ | |
49 | Object getRawFileSystemObject(); | |
50 | ||
51 | /** | |
52 | * Returns whether or not the file system object exists. | |
53 | * | |
54 | * @return whether or not the file system object exists | |
55 | */ | |
56 | boolean exists(); | |
537cd2b8 MAL |
57 | |
58 | /** | |
59 | * Returns whether or not this object represents a directory. | |
60 | * | |
61 | * @return whether or not this object represents a directory. | |
62 | */ | |
63 | boolean isDirectory(); | |
f17bb886 | 64 | } |