code: @Override
    public void setXAttr(Path path, String name, byte[] value, EnumSet<XAttrSetFlag> flags)
        throws IOException {
      logger.atFine().log(
          "GHFS.setXAttr: %s, %s, %s, %s", path, name, lazy(() -> new String(value, UTF_8)), flags);
      checkNotNull(path, "path should not be null");
      checkNotNull(name, "name should not be null");
      checkArgument(flags != null && !flags.isEmpty(), "flags should not be null or empty");
  
      FileInfo fileInfo = getGcsFs().getFileInfo(getGcsPath(path));
      String xAttrKey = getXAttrKey(name);
      Map<String, byte[]> attributes = fileInfo.getAttributes();
  
      if (attributes.containsKey(xAttrKey) && !flags.contains(XAttrSetFlag.REPLACE)) {
        throw new IOException(
            String.format(
                "REPLACE flag must be set to update XAttr (name='%s', value='%s') for '%s'",
                name, new String(value, UTF_8), path));
      }
      if (!attributes.containsKey(xAttrKey) && !flags.contains(XAttrSetFlag.CREATE)) {
        throw new IOException(
            String.format(
                "CREATE flag must be set to create XAttr (name='%s', value='%s') for '%s'",
                name, new String(value, UTF_8), path));
      }
  
      UpdatableItemInfo updateInfo =
          new UpdatableItemInfo(
              fileInfo.getItemInfo().getResourceId(),
              ImmutableMap.of(xAttrKey, getXAttrValue(value)));
      getGcsFs().getGcs().updateItems(ImmutableList.of(updateInfo));
      logger.atFine().log("GHFS.setXAttr:=> ");
    }
docs: {@inheritDoc}