docs: public static String getPrefix(final String filename)
      {
          if (filename == null)
          {
              return null;
          }
          final int len = getPrefixLength(filename);
          if (len < 0)
          {
              return null;
          }
          if (len > filename.length())
          {
              return filename + UNIX_SEPARATOR;  // we know this only happens for unix
          }
          return filename.substring(0, len);
      }