code: public static boolean isSimple(String path) {
          int i;
          int max;
          char c;
  
          max = path.length();
          if (max == 0) {
              return false;
          }
          if (path.charAt(0) == '/') {
              return false;
          }
          for (i = 0; i < max; i++) {
              c = path.charAt(i);
              if (c == '/') {
                  if (i > 0 && path.charAt(i - 1) == '/') {
                      return false;
                  }
              } else {
                  if (c != '_' && c != '-' && !Character.isLetter(c) && !Character.isDigit(c)) {
                      return false;
                  }
              }
          }
          return true;
      }
docs: --