Skip to content

NIO: Support string file attributes #811

Closed
@jart

Description

@jart

Implement these method:

  public Map<String, Object> readAttributes(Path path, String attributes, LinkOption... options) {
    // Java 7 NIO defines at least eleven string attributes we'd want to support
    // (eg. BasicFileAttributeView and PosixFileAttributeView), so rather than a partial
    // implementation we rely on the other overload for now.
    throw new UnsupportedOperationException();
  }

  /**
   * Throws {@link UnsupportedOperationException} because Cloud Storage objects are immutable.
   */
  @Override
  public void setAttribute(Path path, String attribute, Object value, LinkOption... options) {
    throw new CloudStorageObjectImmutableException();
  }

This hasn't been a priority so far, because a type-safe version of this API exists that offers the exact same functionality. We consider that API better. Bet we need to support this too.

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions