private static void readAll(File file, AttributeProvider provider, Map<String, Object> map) {
    for (String attribute : provider.attributes(file)) {
      Object value = provider.get(file, attribute);

      // check for null to protect against race condition when an attribute present when
      // attributes(file) was called is deleted before get() is called for that attribute
      if (value != null) {
        map.put(attribute, value);
      }
    }
  }
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