Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Unified Diff: common/gcloud/gs/path.go

Issue 1863973002: LogDog: Update to archival V2. (Closed) Base URL: https://github.com/luci/luci-go@grpcutil-errors
Patch Set: Code review comments, use Pub/Sub, archival staging, quality of life. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: common/gcloud/gs/path.go
diff --git a/common/gcloud/gs/path.go b/common/gcloud/gs/path.go
index 4888bb5f23691bdf090a83a87798f050958aa65a..8fb97ee68ea73b0b93a8765d74798500dd164223 100644
--- a/common/gcloud/gs/path.go
+++ b/common/gcloud/gs/path.go
@@ -71,6 +71,12 @@ func (p Path) Split() (bucket string, filename string) {
return
}
+// IsFullPath returns true if the Path contains both a bucket and file name.
+func (p Path) IsFullPath() bool {
+ bucket, filename := p.Split()
+ return (bucket != "" && filename != "")
+}
+
// Concat concatenates a filename component to the end of Path.
//
// Multiple components may be specified. In this case, each will be added as a

Powered by Google App Engine
This is Rietveld 408576698