code: public static StorageDir newStorageDir(StorageTier tier, int dirIndex, long capacityBytes,
        String dirPath) throws BlockAlreadyExistsException, IOException, WorkerOutOfSpaceException {
      StorageDir dir = new StorageDir(tier, dirIndex, capacityBytes, dirPath);
      dir.initializeMeta();
      return dir;
    }
docs: Factory method to create {@link StorageDir}.
  
  It will load metadata of existing committed blocks in the dirPath specified. Only files with
  directory depth 1 under dirPath and whose file name can be parsed into {@code long} will be
  considered as existing committed blocks, these files will be preserved, others files or
  directories will be deleted.
  
  @param tier the {@link StorageTier} this dir belongs to
  @param dirIndex the index of this dir in its tier
  @param capacityBytes the initial capacity of this dir, can not be modified later
  @param dirPath filesystem path of this dir for actual storage
  @return the new created {@link StorageDir}
  @throws BlockAlreadyExistsException when metadata of existing committed blocks already exists
  @throws WorkerOutOfSpaceException when metadata can not be added due to limited left space