< prev index next >

src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileStore.java

Print this page
rev 54189 : 8213031: (zipfs) Add support for POSIX file permissions

*** 1,7 **** /* ! * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 30,40 **** --- 30,42 ---- import java.nio.file.FileSystems; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.attribute.BasicFileAttributeView; import java.nio.file.attribute.FileAttributeView; + import java.nio.file.attribute.FileOwnerAttributeView; import java.nio.file.attribute.FileStoreAttributeView; + import java.nio.file.attribute.PosixFileAttributeView; /** * @author Xueming Shen, Rajendra Gutupalli, Jaya Hangal */ class ZipFileStore extends FileStore {
*** 61,76 **** } @Override public boolean supportsFileAttributeView(Class<? extends FileAttributeView> type) { return (type == BasicFileAttributeView.class || ! type == ZipFileAttributeView.class); } @Override public boolean supportsFileAttributeView(String name) { ! return name.equals("basic") || name.equals("zip"); } @Override public <V extends FileStoreAttributeView> V getFileStoreAttributeView(Class<V> type) { if (type == null) --- 63,81 ---- } @Override public boolean supportsFileAttributeView(Class<? extends FileAttributeView> type) { return (type == BasicFileAttributeView.class || ! type == ZipFileAttributeView.class || ! ((type == FileOwnerAttributeView.class || ! type == PosixFileAttributeView.class) && zfs.supportPosix)); } @Override public boolean supportsFileAttributeView(String name) { ! return "basic".equals(name) || "zip".equals(name) || ! (("owner".equals(name) || "posix".equals(name)) && zfs.supportPosix); } @Override public <V extends FileStoreAttributeView> V getFileStoreAttributeView(Class<V> type) { if (type == null)
< prev index next >