@Test public void iteratorEmptyDirectory() throws IOException { AmazonS3ClientMock client = AmazonS3MockFactory.getAmazonClientMock(); client.bucket("bucketA").dir("dir"); S3FileSystem s3FileSystem = (S3FileSystem) FileSystems.getFileSystem(endpoint); S3Path path = s3FileSystem.getPath("/bucketA", "dir"); S3Iterator iterator = new S3Iterator(path); assertFalse(iterator.hasNext()); }
@Override public boolean hasNext() { return cursor != size || current.isTruncated(); }
S3Iterator implements Iterator<Path> { @Override public boolean hasNext() { return cursor != size || current.isTruncated(); } }
S3Iterator implements Iterator<Path> { @Override public boolean hasNext() { return cursor != size || current.isTruncated(); } S3Iterator(S3Path path);  S3Iterator(S3Path path, boolean incremental);  S3Iterator(S3FileStore fileStore, String key, boolean incremental); }
S3Iterator implements Iterator<Path> { @Override public boolean hasNext() { return cursor != size || current.isTruncated(); } S3Iterator(S3Path path);  S3Iterator(S3Path path, boolean incremental);  S3Iterator(S3FileStore fileStore, String key, boolean incremental); @Override boolean hasNext(); @Override S3Path next(); @Override void remove(); }
S3Iterator implements Iterator<Path> { @Override public boolean hasNext() { return cursor != size || current.isTruncated(); } S3Iterator(S3Path path);  S3Iterator(S3Path path, boolean incremental);  S3Iterator(S3FileStore fileStore, String key, boolean incremental); @Override boolean hasNext(); @Override S3Path next(); @Override void remove();  }