private void deleteRecursively(File file) {
    if (file.isDirectory()) {
      File[] children = file.listFiles();
      if (children != null) {
        for (File child : children) {
          deleteRecursively(child);
        }
      }
    }
    file.delete();
  }
Cleans up the staging directory by deleting all files and directories within it.
It also deletes any files in the root directory that match the prefixes of the staging files.

@param targetPath The path to the root directory where the staging directory is located
@param stagingDirectoryName The name of the staging directory to clean up
@param storeId The store ID for which the cleanup is being performed
@throws IOException if an I/O error occurs during cleanup
ambry-store/src/main/java/com/github/ambry/store/FileStore.java