//find out about the path
fileStatus = getFileStatus(directory);
if (!SwiftUtils.isDirectory(fileStatus)) {
//if it's a file, raise an error
throw new ParentNotDirectoryException(
String.format("%s: can't mkdir since it exists and is not a directory: %s",
directory, fileStatus));
} else {
//path exists, and it is a directory
if (LOG.isDebugEnabled()) {