public class DbxPathV1
extends java.lang.Object
String
s
to represent paths.
Dropbox paths always start with with a slash ("/"
).
For full-Dropbox apps, the path is relative to the
root of the user's Dropbox. For App Folder apps,
the path is relative to the App Folder.
Constructor and Description |
---|
DbxPathV1() |
Modifier and Type | Method and Description |
---|---|
static void |
checkArg(java.lang.String argName,
java.lang.String value) |
static void |
checkArgNonRoot(java.lang.String argName,
java.lang.String value) |
static java.lang.String |
findError(java.lang.String path) |
static java.lang.String |
getName(java.lang.String path)
Returns just the last component of the path.
|
static java.lang.String |
getParent(java.lang.String path)
Returns the parent path of the given path or
null if the path
is "/" . |
static boolean |
isValid(java.lang.String path) |
static java.lang.String[] |
split(java.lang.String path) |
public static boolean isValid(java.lang.String path)
public static java.lang.String findError(java.lang.String path)
public static void checkArg(java.lang.String argName, java.lang.String value)
public static void checkArgNonRoot(java.lang.String argName, java.lang.String value)
public static java.lang.String getName(java.lang.String path)
getName("/")
→ "/"
getName("/Photos")
→ "Photos"
getName("/Photos/Home.jpeg")
→ "Home.jpeg"
public static java.lang.String[] split(java.lang.String path)
public static java.lang.String getParent(java.lang.String path)
null
if the path
is "/"
.
getParent("/")
→ null
getParent("/Photos")
→ "/"
getParent("/Photos/Recent/Home.jpeg")
→ "/Photos/Recent"