You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: branches/gcs-nio/gcloud-java-contrib/gcloud-java-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileAttributeView.java
Copy file name to clipboardExpand all lines: branches/gcs-nio/gcloud-java-contrib/gcloud-java-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileAttributes.java
Copy file name to clipboardExpand all lines: branches/gcs-nio/gcloud-java-contrib/gcloud-java-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystem.java
Copy file name to clipboardExpand all lines: branches/gcs-nio/gcloud-java-contrib/gcloud-java-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemProvider.java
Copy file name to clipboardExpand all lines: branches/gcs-nio/gcloud-java-contrib/gcloud-java-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageObjectAttributes.java
Copy file name to clipboardExpand all lines: branches/gcs-nio/gcloud-java-contrib/gcloud-java-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStoragePath.java
Copy file name to clipboardExpand all lines: branches/gcs-nio/gcloud-java-contrib/gcloud-java-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStoragePseudoDirectoryAttributes.java
Copy file name to clipboardExpand all lines: branches/gcs-nio/gcloud-java-contrib/gcloud-java-nio/src/test/java/com/google/cloud/storage/contrib/nio/it/ITGcsNio.java
+25Lines changed: 25 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -27,10 +27,12 @@
27
27
importjava.nio.ByteBuffer;
28
28
importjava.nio.channels.ReadableByteChannel;
29
29
importjava.nio.channels.SeekableByteChannel;
30
+
importjava.nio.file.FileSystem;
30
31
importjava.nio.file.Files;
31
32
importjava.nio.file.NoSuchFileException;
32
33
importjava.nio.file.Path;
33
34
importjava.nio.file.StandardOpenOption;
35
+
importjava.util.ArrayList;
34
36
importjava.util.Arrays;
35
37
importjava.util.List;
36
38
importjava.util.Random;
@@ -317,6 +319,29 @@ public void testCopy() throws IOException {
317
319
}
318
320
}
319
321
322
+
@Test
323
+
publicvoidtestListFiles() throwsIOException {
324
+
try (FileSystemfs = getTestBucket()) {
325
+
List<Path> goodPaths = newArrayList<>();
326
+
List<Path> paths = newArrayList<>();
327
+
goodPaths.add(fs.getPath("dir/angel"));
328
+
goodPaths.add(fs.getPath("dir/alone"));
329
+
paths.add(fs.getPath("dir/dir2/another_angel"));
330
+
paths.add(fs.getPath("atroot"));
331
+
paths.addAll(goodPaths);
332
+
goodPaths.add(fs.getPath("dir/dir2/"));
333
+
for (Pathpath : paths) {
334
+
fillFile(storage, path.toString(), SML_SIZE);
335
+
}
336
+
337
+
List<Path> got = newArrayList<>();
338
+
for (Pathpath : Files.newDirectoryStream(fs.getPath("dir/"))) {
0 commit comments