docs: public void copy(final File path, final CopyFlags... flags) {
      requireNonNull(path);
      if (!path.exists()) {
        throw new InvalidCopyDestination("Path must exist");
      }
      if (!path.isDirectory()) {
        throw new InvalidCopyDestination("Path must be a directory");
      }
      final String[] files = path.list();
      if (files != null && files.length > 0) {
        throw new InvalidCopyDestination("Path must contain no files");
      }
      final int flagsMask = mask(flags);
      checkRc(LIB.mdb_env_copy2(ptr, path.getAbsolutePath(), flagsMask));
    }