protected boolean parentExists ( String path ) throws IOException { // Assume root always has a parent if ( isRoot ( path ) ) { return true ; } String parentKey = getParentPath ( path ) ; return parentKey != null && isDirectory ( parentKey ) ; }
Treating the object store as a file system checks if the parent directory exists .