code: private void createIntermediateFoldersObjects( CPath leafFolderPath )
              throws CStorageException
      {
          // We check for folder existence before creation,
          // as in general leaf folder is likely to already exist.
          // So we walk from leaf to root:
          CPath path = leafFolderPath;
  
          List<CPath> parentFolders = new LinkedList<CPath>();
          CFile file;
          while ( !path.isRoot() ) {
              file = getFile( path );
              if ( file != null ) {
                  if ( file.isBlob() ) {
                      // Problem here: clash between folder and blob
                      throw new CInvalidFileTypeException( file.getPath(), false );
                  }
                  break;
              } else {
                  LOGGER.debug( "Nothing exists at path: {}, will go up", path );
                  parentFolders.add( 0, path );
                  path = path.getParent();
              }
          }
  
          // By now we know which folders to create:
          if ( !parentFolders.isEmpty() ) {
              LOGGER.debug( "Inexisting parent_folders will be created: {}", parentFolders );
              for ( CPath parent : parentFolders ) {
                  LOGGER.debug( "Creating intermediate folder: {}", parent );
                  rawCreateFolder( parent );
              }
          }
      }
docs: Create any parent folders if they do not exist, to meet old swift convention.
  <p/>
  hubiC requires these objects for the sub-objects to be visible in webapp. As an optimization, we consider that if
  folder a/b/c exists, then a/ and a/b/ also exist so are not checked nor created.
  
  @param leafFolderPath