Package com.google.cloud.hadoop.gcsio
Class StringPaths
- java.lang.Object
-
- com.google.cloud.hadoop.gcsio.StringPaths
-
public final class StringPaths extends Object
Utility methods for String GCS paths
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringfromComponents(String bucketName, String objectName)Helper for standardizing the way various human-readable messages in logs/exceptions that refer to a bucket/object pair.static booleanisDirectoryPath(String path)Indicates whether the given object name looks like a directory path.static StringtoFilePath(String path)Converts the given object name to look like a file path.
-
-
-
Method Detail
-
fromComponents
public static String fromComponents(String bucketName, String objectName)
Helper for standardizing the way various human-readable messages in logs/exceptions that refer to a bucket/object pair.
-
isDirectoryPath
public static boolean isDirectoryPath(String path)
Indicates whether the given object name looks like a directory path.- Parameters:
path- Name of the object to inspect.- Returns:
- Whether the given object name looks like a directory path.
-
toFilePath
public static String toFilePath(String path)
Converts the given object name to look like a file path. If the object name already looks like a file path then this call is a no-op.If the object name is null or empty, it is returned as-is.
- Parameters:
path- Name of the object to inspect.- Returns:
- File path for the given path.
-
-