private static String getSingleAttribute(String attribute) {
    ImmutableList<String> attributeNames = getAttributeNames(attribute);

    if (attributeNames.size() != 1 || ALL_ATTRIBUTES.equals(attributeNames.get(0))) {
      throw new IllegalArgumentException("must specify a single attribute: " + attribute);
    }

    return attributeNames.get(0);
  }
Returns attributes of the given file as an object of the given type.

@throws UnsupportedOperationException if the given attributes type is not supported
jimfs/src/main/java/com/google/common/jimfs/AttributeService.java