blob: 476add3c7a4d623aeb260c0ba7f0660f52754697 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
/**********************************************************************
* Copyright (c) 2002,2003 Timesys Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* Timesys - Initial API and implementation
**********************************************************************/
package org.eclipse.cdt.core.builder.util;
import java.io.File;
/**
* Abstracts information about a filesystem in order to allow
* translation between native/unix pathnames.
*/
public interface IFilesystem {
public static String FILESYSTEM_ROOT = "/"; //$NON-NLS-1$
public static char PATHSEP_WINDOWS = '\\'; //$NON-NLS-1$
public static char PATHSEP_CYGWIN = '\\'; //$NON-NLS-1$
/**
* Get the root directory for the filesystem.
*
* The root directory is returned in native filesystem format
* (ex, "C:/cygwin/" on Windows, "/" on Unix.) The returned
* string is guaranteed to have a trailing path seperator.
*/
public String getRoot();
/**
* Convert the provided path into a native path.
*
* @param path path to convert.
* @return native representation of path.
*/
public String getNativePath(String path);
/**
* Convert the provided path into a native path.
*
* @param path path to convert.
* @return native representation of path.
*/
public String getNativePath(File path);
/**
* Convert the provided path into a unix path.
*
* @param path path to convert.
* @return unix representation of path.
*/
public String getUnixPath(String path);
/**
* Convert the provided path into a unix path.
*
* @param path path to convert.
* @return unix representation of path.
*/
public String getUnixPath(File path);
}
|