docs: private boolean canWriteErrorDir(File errorPath) {
          String[] files = errorPath.list();
          if (files != null && files.length > FILE_CONTENT_LOG_MAX_FILE_NUM) {
              long now = System.currentTimeMillis();
              int delNum = 0;
              for (String filename : files) {
                  File errImg = new File(errorPath, filename);
                  if (now - errImg.lastModified() > EXPIRED_PERIOD) {
                      errImg.delete();
                      delNum++;
                  }
              }
  
              if (files.length - delNum <= FILE_CONTENT_LOG_MAX_FILE_NUM) {
                  return true;
              }
  
              return false;
          }
  
          return true;
      }