< prev index next >
src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystemProvider.java
Print this page
rev 53081 : 8213031: (zipfs) Add support for POSIX file permissions
Reviewed-by: simonis
*** 36,45 ****
--- 36,46 ----
import java.nio.file.*;
import java.nio.file.DirectoryStream.Filter;
import java.nio.file.attribute.BasicFileAttributes;
import java.nio.file.attribute.FileAttribute;
import java.nio.file.attribute.FileAttributeView;
+ import java.nio.file.attribute.PosixFileAttributes;
import java.nio.file.spi.FileSystemProvider;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ExecutorService;
*** 286,306 ****
@SuppressWarnings("unchecked") // Cast to A
public <A extends BasicFileAttributes> A
readAttributes(Path path, Class<A> type, LinkOption... options)
throws IOException
{
! if (type == BasicFileAttributes.class || type == ZipFileAttributes.class)
return (A)toZipPath(path).getAttributes();
return null;
}
@Override
public Map<String, Object>
! readAttributes(Path path, String attribute, LinkOption... options)
throws IOException
{
! return toZipPath(path).readAttributes(attribute, options);
}
@Override
public Path readSymbolicLink(Path link) throws IOException {
throw new UnsupportedOperationException("Not supported.");
--- 287,309 ----
@SuppressWarnings("unchecked") // Cast to A
public <A extends BasicFileAttributes> A
readAttributes(Path path, Class<A> type, LinkOption... options)
throws IOException
{
! if (type == BasicFileAttributes.class ||
! type == PosixFileAttributes.class ||
! type == ZipFileAttributes.class)
return (A)toZipPath(path).getAttributes();
return null;
}
@Override
public Map<String, Object>
! readAttributes(Path path, String attributes, LinkOption... options)
throws IOException
{
! return toZipPath(path).readAttributes(attributes, options);
}
@Override
public Path readSymbolicLink(Path link) throws IOException {
throw new UnsupportedOperationException("Not supported.");
< prev index next >