code: protected void prepareRootDir(String rootDirPath) throws IOException, RepositoryConfigurationException
     {
        this.rootDir = new File(rootDirPath);
  
        if (!rootDir.exists())
        {
           if (rootDir.mkdirs())
           {
              LOG.info("Value storage directory created: " + rootDir.getAbsolutePath());
              
              // create internal temp dir
              File tempDir = new File(rootDir, TEMP_DIR_NAME);
              tempDir.mkdirs();
  
              if (tempDir.exists() && tempDir.isDirectory())
              {
                 // care about storage temp dir cleanup
                 for (File tmpf : tempDir.listFiles())
                    if (!tmpf.delete())
                       LOG.warn("Storage temporary directory contains un-deletable file " + tmpf.getAbsolutePath()
                          + ". It's recommended to leave this directory for JCR External Values Storage private use.");
              }
              else
                 throw new RepositoryConfigurationException("Cannot create " + TEMP_DIR_NAME
                    + " directory under External Value Storage.");
           }
           else
           {
              LOG.warn("Directory IS NOT created: " + rootDir.getAbsolutePath());
           }
        }
        else
        {
           if (!rootDir.isDirectory())
           {
              throw new RepositoryConfigurationException("File exists but is not a directory " + rootDirPath);
           }
        }
     }
docs: Prepare RootDir.
  
  @param rootDirPath
  path
  @throws IOException
  if error
  @throws RepositoryConfigurationException
  if confog error