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/tswast-patch-1/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/tswast-patch-1/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/tswast-patch-1/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;
@@ -316,6 +318,29 @@ public void testCopy() throws IOException {
316
318
}
317
319
}
318
320
321
+
@Test
322
+
publicvoidtestListFiles() throwsIOException {
323
+
try (FileSystemfs = getTestBucket()) {
324
+
List<Path> goodPaths = newArrayList<>();
325
+
List<Path> paths = newArrayList<>();
326
+
goodPaths.add(fs.getPath("dir/angel"));
327
+
goodPaths.add(fs.getPath("dir/alone"));
328
+
paths.add(fs.getPath("dir/dir2/another_angel"));
329
+
paths.add(fs.getPath("atroot"));
330
+
paths.addAll(goodPaths);
331
+
goodPaths.add(fs.getPath("dir/dir2/"));
332
+
for (Pathpath : paths) {
333
+
fillFile(storage, path.toString(), SML_SIZE);
334
+
}
335
+
336
+
List<Path> got = newArrayList<>();
337
+
for (Pathpath : Files.newDirectoryStream(fs.getPath("dir/"))) {
Copy file name to clipboardExpand all lines: branches/tswast-patch-1/gcloud-java-storage/src/main/java/com/google/cloud/storage/testing/FakeStorageRpc.java
+26-11Lines changed: 26 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,7 @@ public Tuple<String, Iterable<Bucket>> list(Map<Option, ?> options) throws Stora
0 commit comments