public void cleanTargetStorages(BuildTarget<?> target) throws IOException {
    try {
      BuildTargetStorages storages = myTargetStorages.remove(target);
      if (storages != null) {
        storages.close();
      }
    }
    finally {
      // delete all data except src-out mapping which is cleaned in a special way
      final File[] targetData = myDataPaths.getTargetDataRoot(target).listFiles();
      if (targetData != null) {
        final File srcOutputMapRoot = getSourceToOutputMapRoot(target);
        for (File dataFile : targetData) {
          if (!FileUtil.filesEqual(dataFile, srcOutputMapRoot)) {
            FileUtil.delete(dataFile);
          }
        }
      }
    }
  }
public void cleanTargetStorages(BuildTarget<?> target)