Restoring BlobStoreUtils.parseDirectoryFromPath

Removed in 1bdf8a1 but used in downstream repos, e.g. jclouds-karaf
This commit is contained in:
Andrew Phillips 2014-10-06 09:50:24 -04:00
parent 65d40b4435
commit d3d92d06da

View File

@ -40,6 +40,10 @@ public class BlobStoreUtils {
.headers(returnVal.getHeaders()).payload(returnVal.getPayload()).build();
}
public static String parseDirectoryFromPath(String path) {
return checkNotNull(path, "path").substring(0, path.lastIndexOf('/'));
}
private static Pattern keyFromContainer = Pattern.compile("/?[^/]+/(.*)");
public static String getNameFor(GeneratedHttpRequest request) {