Skip to content

Commit 5f6ac74

Browse files
authored
docs: Update documentation to be clearer on pseudo-directory pitfalls (#980)
1 parent 31dd30d commit 5f6ac74

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.readme-partials.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ custom_content: |
7272
always be assumed to exist, without performing any I/O. Paths without the trailing
7373
slash will result in an I/O operation to check a file is present in that "directory".
7474
This allows you to do path manipulation in the same manner as you would with the normal UNIX file
75-
system implementation. You can disable this feature with
76-
`CloudStorageConfiguration.usePseudoDirectories()`.
75+
system implementation. Using this feature with buckets or "directory" paths that do not exist
76+
is not recommended, as at the time I/O is performed the failure may not be handled gracefully.
77+
You can disable this feature with `CloudStorageConfiguration.usePseudoDirectories()`.
7778
7879
#### Complete source code
7980

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,9 @@ path that includes a trailing slash, will be considered a directory. It will
174174
always be assumed to exist, without performing any I/O. Paths without the trailing
175175
slash will result in an I/O operation to check a file is present in that "directory".
176176
This allows you to do path manipulation in the same manner as you would with the normal UNIX file
177-
system implementation. You can disable this feature with
178-
`CloudStorageConfiguration.usePseudoDirectories()`.
177+
system implementation. Using this feature with buckets or "directory" paths that do not exist
178+
is not recommended, as at the time I/O is performed the failure may not be handled gracefully.
179+
You can disable this feature with `CloudStorageConfiguration.usePseudoDirectories()`.
179180

180181
#### Complete source code
181182

google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageConfiguration.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ public abstract class CloudStorageConfiguration {
5656
* directories.
5757
*
5858
* <p>With this feature, if file "foo/bar.txt" exists then both "foo" and "foo/" will be treated
59-
* as if they were existing directories.
59+
* as if they were existing directories. On path construction no I/O will be performed, bucket and
60+
* "directory" will treated as if they exist.
6061
*/
6162
public abstract boolean usePseudoDirectories();
6263

0 commit comments

Comments
 (0)