|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.fs.Path
public class Path
Names a file or directory in a FileSystem
.
Path strings use slash as the directory separator. A path string is
absolute if it begins with a slash.
Field Summary | |
---|---|
static String |
CUR_DIR
|
static String |
SEPARATOR
The directory separator, a slash. |
static char |
SEPARATOR_CHAR
|
Constructor Summary | |
---|---|
Path(Path parent,
Path child)
Resolve a child path against a parent path. |
|
Path(Path parent,
String child)
Resolve a child path against a parent path. |
|
Path(String pathString)
Construct a path from a String. |
|
Path(String parent,
Path child)
Resolve a child path against a parent path. |
|
Path(String parent,
String child)
Resolve a child path against a parent path. |
|
Path(String scheme,
String authority,
String path)
Construct a Path from components. |
|
Path(URI aUri)
Construct a path from a URI |
Method Summary | |
---|---|
int |
compareTo(Object o)
|
int |
depth()
Return the number of elements in this path. |
boolean |
equals(Object o)
|
FileSystem |
getFileSystem(Configuration conf)
Return the FileSystem that owns this Path. |
String |
getName()
Returns the final component of this path. |
Path |
getParent()
Returns the parent of a path or null if at root. |
int |
hashCode()
|
boolean |
isAbsolute()
True if the directory of this path is absolute. |
Path |
makeQualified(FileSystem fs)
Returns a qualified path object. |
Path |
makeQualified(URI defaultUri,
Path workingDir)
Returns a qualified path object. |
Path |
suffix(String suffix)
Adds a suffix to the final name in the path. |
String |
toString()
|
URI |
toUri()
Convert this to a URI. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String SEPARATOR
public static final char SEPARATOR_CHAR
public static final String CUR_DIR
Constructor Detail |
---|
public Path(String parent, String child)
public Path(Path parent, String child)
public Path(String parent, Path child)
public Path(Path parent, Path child)
public Path(String pathString)
public Path(String scheme, String authority, String path)
public Path(URI aUri)
Method Detail |
---|
public URI toUri()
public FileSystem getFileSystem(Configuration conf) throws IOException
IOException
public boolean isAbsolute()
public String getName()
public Path getParent()
public Path suffix(String suffix)
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int compareTo(Object o)
compareTo
in interface Comparable
public int depth()
public Path makeQualified(FileSystem fs)
public Path makeQualified(URI defaultUri, Path workingDir)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |