@Test public void testView() throws IOException { DosFileAttributeView view = provider.view( fileLookup(), ImmutableMap.<String, FileAttributeView>of( "basic", new BasicAttributeProvider().view(fileLookup(), NO_INHERITED_VIEWS))); assertNotNull(view); assertThat(view.name()).isEqualTo("dos"); DosFileAttributes attrs = view.readAttributes(); assertThat(attrs.isHidden()).isFalse(); assertThat(attrs.isArchive()).isFalse(); assertThat(attrs.isReadOnly()).isFalse(); assertThat(attrs.isSystem()).isFalse(); view.setArchive(true); view.setReadOnly(true); view.setHidden(true); view.setSystem(false); assertThat(attrs.isHidden()).isFalse(); assertThat(attrs.isArchive()).isFalse(); assertThat(attrs.isReadOnly()).isFalse(); attrs = view.readAttributes(); assertThat(attrs.isHidden()).isTrue(); assertThat(attrs.isArchive()).isTrue(); assertThat(attrs.isReadOnly()).isTrue(); assertThat(attrs.isSystem()).isFalse(); view.setTimes(FileTime.fromMillis(0L), null, null); assertThat(view.readAttributes().lastModifiedTime()).isEqualTo(FileTime.fromMillis(0L)); }
@Override public DosFileAttributeView view( FileLookup lookup, ImmutableMap<String, FileAttributeView> inheritedViews) { return new View(lookup, (BasicFileAttributeView) inheritedViews.get("basic")); }
DosAttributeProvider extends AttributeProvider { @Override public DosFileAttributeView view( FileLookup lookup, ImmutableMap<String, FileAttributeView> inheritedViews) { return new View(lookup, (BasicFileAttributeView) inheritedViews.get("basic")); } }
DosAttributeProvider extends AttributeProvider { @Override public DosFileAttributeView view( FileLookup lookup, ImmutableMap<String, FileAttributeView> inheritedViews) { return new View(lookup, (BasicFileAttributeView) inheritedViews.get("basic")); }  }
DosAttributeProvider extends AttributeProvider { @Override public DosFileAttributeView view( FileLookup lookup, ImmutableMap<String, FileAttributeView> inheritedViews) { return new View(lookup, (BasicFileAttributeView) inheritedViews.get("basic")); }  @Override String name(); @Override ImmutableSet<String> inherits(); @Override ImmutableSet<String> fixedAttributes(); @Override ImmutableMap<String, ?> defaultValues(Map<String, ?> userProvidedDefaults); @NullableDecl @Override Object get(File file, String attribute); @Override void set(File file, String view, String attribute, Object value, boolean create); @Override Class<DosFileAttributeView> viewType(); @Override DosFileAttributeView view(
      FileLookup lookup, ImmutableMap<String, FileAttributeView> inheritedViews); @Override Class<DosFileAttributes> attributesType(); @Override DosFileAttributes readAttributes(File file); }
DosAttributeProvider extends AttributeProvider { @Override public DosFileAttributeView view( FileLookup lookup, ImmutableMap<String, FileAttributeView> inheritedViews) { return new View(lookup, (BasicFileAttributeView) inheritedViews.get("basic")); }  @Override String name(); @Override ImmutableSet<String> inherits(); @Override ImmutableSet<String> fixedAttributes(); @Override ImmutableMap<String, ?> defaultValues(Map<String, ?> userProvidedDefaults); @NullableDecl @Override Object get(File file, String attribute); @Override void set(File file, String view, String attribute, Object value, boolean create); @Override Class<DosFileAttributeView> viewType(); @Override DosFileAttributeView view(
      FileLookup lookup, ImmutableMap<String, FileAttributeView> inheritedViews); @Override Class<DosFileAttributes> attributesType(); @Override DosFileAttributes readAttributes(File file);  }