public String updatePathWithResetCompactionIndex(String outputFileString){
    Path outputFilePath = Paths.get(outputFileString);
    Path parent = outputFilePath.getParent();
    String targetFileName = resetCompactionCycleIndexInFileName(
        outputFilePath.getFileName().toString());
    return parent != null ? parent.resolve(targetFileName).toString() : Paths.get(targetFileName).toString();
  }
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