/** * {@inheritDoc} */ private static <T> Iterable<T> iter(final Enumeration<T> entries) { return new EnumerationIterable<T>(entries); }
public Iterator<T> iterator() { return new EnumerationIterator<T>(entries); } }
public int getContentLength() { final long size = rootFileSystem.getSize(mountPoint, file); return size > (long) Integer.MAX_VALUE ? -1 : (int) size; }
/** * {@inheritDoc} */ public InputStream openInputStream(final VirtualFile mountPoint, final VirtualFile target) throws IOException { return privileged ? doIoPrivileged(new PrivilegedExceptionAction<InputStream>() { public InputStream run() throws Exception { return new FileInputStream(getFile(mountPoint, target)); } }) : new FileInputStream(getFile(mountPoint, target)); }
public File getContent() throws IOException { return rootFileSystem.getFile(mountPoint, file); }
/** * {@inheritDoc} */ public File getFile(VirtualFile mountPoint, VirtualFile target) throws IOException { return getExistingFile(mountPoint, target).getPhysicalFile(); }
public InputStream getInputStream() throws IOException { return rootFileSystem.openInputStream(mountPoint, file); }
public long getLastModified() { return rootFileSystem.getLastModified(mountPoint, file); }
public File getMountSource() { return fileSystem.getMountSource(); }
@Override public Long run() { return mount.getFileSystem().getSize(mount.getMountPoint(), target); } });
@Override public Boolean run() { return mount.getFileSystem().isFile(mount.getMountPoint(), target); } });
@Override public Boolean run() { return mount.getFileSystem().isDirectory(mount.getMountPoint(), target); } });
@Override public Long run() { return mount.getFileSystem().getLastModified(mount.getMountPoint(), target); } });
@Override public File run() throws Exception { return mount.getFileSystem().getFile(mount.getMountPoint(), target); } });
/** * {@inheritDoc} */ public boolean exists(VirtualFile mountPoint, VirtualFile target) { return getFile(mountPoint, target).exists(); }
/** * {@inheritDoc} */ public InputStream openInputStream(VirtualFile mountPoint, VirtualFile target) throws IOException { return getExistingFile(mountPoint, target).openStream(); }
/** * {@inheritDoc} */ public InputStream openInputStream(VirtualFile mountPoint, VirtualFile target) throws IOException { return new FileInputStream(getFile(mountPoint, target)); }
/** * {@inheritDoc} */ public boolean isDirectory(VirtualFile mountPoint, VirtualFile target) { return getFile(mountPoint, target).isDirectory(); }
/** * {@inheritDoc} */ public boolean delete(VirtualFile mountPoint, VirtualFile target) { return getFile(mountPoint, target).delete(); }
/** * {@inheritDoc} */ public long getLastModified(VirtualFile mountPoint, VirtualFile target) { return getFile(mountPoint, target).lastModified(); }