code: private void cleanLogFilesIfNecessary() {
      File logDir = new File(folderPath);
      File[] files = logDir.listFiles();
      if (files == null) {
        return;
      }
      for (File file : files) {
        if (cleanStrategy.shouldClean(file)) {
            file.delete();
        }
      }
    }
docs: Clean log files if should clean follow strategy